Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Working with removals in level 2 order book

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

    Working with removals in level 2 order book

    I copied the sample code for maintaining a level 2 order book then added a few statements of my own. If the following statement is true: (if rows[e.Position].Volume > e.Volume && e.MarketDataType == MarketDataType.Ask && e.Position == 0), this should mean that an order was removed from the order book at the position given by the current ask price. My question is, does this removal mean that a user manually removed an order from the order book or could it also mean that their order has been filled and subsequently removed by the order book. My end goal is to make an indicator that keeps track of orders that were placed within the timeframe of the current bar and filled before the bar close. Is it even possible to accomplish this with the data that is provided?

    #2
    Hello Ceraphen,

    The level 2 orderbook has specific removal events, checking the prices does not mean a removal. You would need to check for Operation.Remove for remove events. There are no details associated with these events to know why it was removed.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    78 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X