Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MarketDepthEventArgs clarification

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

    MarketDepthEventArgs clarification

    I read through the Help Guide and couldn't arrive the answers.

    1) What does Operation.Remove and Operation.Insert mean? Does this mean limit orders being removed or added?

    2) Can you confirm Position of 0 refers to the best bid/offer.

    3) What if I use both OnMarketData and OnMarketDepth and the top most bid updates. Do both OnMarkeData and OnMarketDepth get called? So if I wanted to handle all limit order data in OnMarketDepth, could I write:

    Code:
    if (e.MarketDataType == MarketDataType.Bid) { return; }
    under OnMarketData

    then under OnMarketDepth write:
    Code:
    if (e.MarketDataType == MarketDataType.Bid && e.Position == 0 && e.Operation == Operation.Update)
    { //do stuff}
    Thanks.
    Last edited by :::grimReaper:::; 11-18-2012, 05:54 PM.

    #2
    Hello,

    Originally posted by :::grimReaper::: View Post
    I read through the Help Guide and couldn't arrive the answers.

    1) What does Operation.Remove and Operation.Insert mean? Does this mean limit orders being removed or added?
    Yes this means an order is being added or removed (limit, stop, stop-limit...)
    2) Can you confirm Position of 0 refers to the best bid/offer.
    Can you please clarify what Position you are referring to?

    3) What if I use both OnMarketData and OnMarketDepth and the top most bid updates. Do both OnMarkeData and OnMarketDepth get called? So if I wanted to handle all limit order data in OnMarketDepth, could I write:

    Code:
    if (e.MarketDataType == MarketDataType.Bid) { return; }
    under OnMarketData

    then under OnMarketDepth write:
    Code:
    if (e.MarketDataType == MarketDataType.Bid && e.Position == 0 && e.Operation == Operation.Update)
    { //do stuff}
    Thanks.
    They will both get called asynchronously. Could you please clarify what you mean by handle limit order data?
    LanceNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Lance View Post
      Yes this means an order is being added or removed (limit, stop, stop-limit...)
      What do you mean by stop and stop limit? Are you saying I have access to stop and stop limit order data from the exchange? I use Zenfire. Thanks.

      Comment


        #4
        Hello,
        Originally posted by :::grimReaper::: View Post
        What do you mean by stop and stop limit? Are you saying I have access to stop and stop limit order data from the exchange? I use Zenfire. Thanks.
        Operation represents the action you should take when building a level two book.
        Possible values are
        Operation.Insert Operation.Remove
        Operation.Update


        These will not let you see the individual order type being sent to the exchange but are used to add/remove/update the bid/ask price.



        I mentioned the different order types because I wanted to make clear that the orders could be of different types and would not be just limit orders.

        Here is some sample code that might be of further help: http://www.ninjatrader.com/support/f...ead.php?t=3478

        Please let me know if I can be of further assistance.
        Last edited by NinjaTrader_Lance; 11-20-2012, 09:52 AM.
        LanceNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        561 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        325 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X