Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Working with Market Depth

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Working with Market Depth

    Hi all,
    I'm trying to analyze what happens on the ladder across various instruments, so I started recording marketdepth events through ninja.

    What I don't understand is how the process of registering the events works:
    1) Operation "Insert" means a NEW Bid/Offer has been put on the ladder where previously was "blank"
    2) Operation "Update" means the Volume of Bid/Offer is updated where there was already a Bid or an Offer
    3) Operation "Remove" ? This should tell that a Bid/Offer has been pulled from the ladder but if I record this event it doesn't say which price was pulled.

    Can you please clarify? For your benefit please see below a quick extract of market depth this morning of 6A

    A;07/03/2013;08:14:29;29;0;Ask;Update;1.0245;28
    6A;07/03/2013;08:14:29;29;0;Bid;Update;1.0244;34
    6A;07/03/2013;08:14:29;29;0;Ask;Update;1.0245;27
    6A;07/03/2013;08:14:29;29;0;Bid;Update;1.0244;35
    6A;07/03/2013;08:14:29;29;0;Ask;Update;1.0245;16
    6A;07/03/2013;08:14:25;25;0;Ask;Update;1.0246;61
    6A;07/03/2013;08:14:29;29;0;Ask;Update;1.0245;6
    6A;07/03/2013;08:14:29;29;0;Ask;Remove;0;0
    6A;07/03/2013;08:14:29;29;0;Ask;Insert;1.025;175
    6A;07/03/2013;08:14:29;29;0;Bid;Remove;0;0
    6A;07/03/2013;08:14:29;29;0;Bid;Insert;1.0241;136

    #2
    Hello phi3zz0,

    You are understanding is correct of all of the Operations. When the Operation.Remove is called it will not tell you the Price but it will tell you the Position. For example most Market Depth on Instruments will be 5 (numbered 0-4) in either direction, and when a Remove it called it will tell what Position it is removing. So here would be a sample output.

    Remove
    Price: 0 Position: 4 MarketDataType: Bid
    Insert
    Price: 1.0247 Position: 4 MarketDataType: Bid

    You may view the following sample indicator for an example on how the OnMarketDepth() method functions.


    Note that if you want to know what price was removed, you can create a Level II book that will hold all of this information and when the Position has been marked as removed you can see which position was removed if you like.
    Last edited by NinjaTrader_JC; 03-07-2013, 08:23 AM.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by PhillT, 04-19-2024, 02:16 PM
    4 responses
    31 views
    0 likes
    Last Post PhillT
    by PhillT
     
    Started by ageeholdings, 05-01-2024, 05:22 AM
    5 responses
    36 views
    0 likes
    Last Post ageeholdings  
    Started by reynoldsn, Today, 02:34 PM
    0 responses
    10 views
    0 likes
    Last Post reynoldsn  
    Started by nightstalker, Today, 02:05 PM
    0 responses
    17 views
    0 likes
    Last Post nightstalker  
    Started by llanqui, Yesterday, 09:59 AM
    8 responses
    30 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Working...
    X