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

Access to all Book orders

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

    Access to all Book orders

    Hello Ninjas

    We need to build a complete "Order Book" similar thats usually usage in B3 (Brazil).
    The all platforms here in Brazil show to traders the complete Order Book (Image atached) each order included the brokerage firm ID who sent the order.

    Questions:

    1 - I have already studied the entire MarketDeph method and have no way to rebuild the "order book" correctly with the method. Therefore I need to access Level II order by order before the system grouped into price levels.

    2 - Here in Brazil each on the BooK "executed order" and each "posted order" has the ID of the broker that sent the order. Exist some way to access this information in MD?
    For NinjaTrader 8 to have acceptance of the Brazilian traders would be very important to have access to the complete book with the brokerages.

    Thanks
    Attached Files

    #2
    Hello MarceloF,

    Thanks for your post.

    I may suggest to use the SampleLevel2Book example for analyzing the order book for a given instrument. From the context of an AddOn you could subscribe to the MarketDepthUpdate event to subscribe to Market Depth updates for multiple instruments.

    SampleLevel2Book - https://ninjatrader.com/support/help...vel_ii_dat.htm

    MarketDepth - https://ninjatrader.com/support/help...arketdepth.htm

    To answer your second question, this would involve analysis of the order book to see, for example. where a bid/ask are placed and to see if volume traded at that bid/ask or has exceeded that level. If it has the order was filled, if it has been Removed without the conditions to fill becoming true, the order was pulled.

    Some additional threads on studying level 2 data with Market Depth Updates are linked below.

    https://ninjatrader.com/support/foru...ketdepth-query
    https://ninjatrader.com/support/foru...order-question

    Please let me know if I can be of further assistance.
    Last edited by NinjaTrader_Jim; 03-15-2019, 01:47 PM.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim
      I understood what you told me, but I woul like to know if have a way to access roder by order.
      I can identify order by order monitoring the price with de volume (incresase), but I can not identify which order (or part of order) is canceled, threfore i do not know whats is the correct sequence of orders in the same price, because when ocurs the cancellation I dont know if were cancelled the first order... or the last order... or one order specific betweem the first order and the last order.
      I use this command and accses all ask/bid, but is all orders cumsum volumes in the price level

      for (int index = 0; index < e.Instrument.MarketDepth.Asks.Count; index++)
      {

      Print("ASKS "+index+" "+e.Instrument.MarketDepth.Asks[index].MarketMaker+" "+
      e.Instrument.MarketDepth.Asks[index].Price+" "+
      e.Instrument.MarketDepth.Asks[index].Time+" "+
      e.Instrument.MarketDepth.Asks[index].Volume);
      }

      I really need to know have some way of accessing the separate orders (without being grouped by price)
      Thnaks

      Comment


        #4
        Hello MarceloF,

        I do not believe there would be a good way to identify this.

        You may see how many orders are added to the book, and the amount of volume at the price could tell you where your position would be as far the order in which the exchange fills orders.

        However, once you place your order, you may see changes in volume, which may involve orders filled or removed before or after your order submission. Since their is no obvious identifier like an OrderID to distinguish which order got removed, we would not know how the position would be changed when the volume changes.

        Please let me know if there is anything else I can do to help.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, Yesterday, 06:40 PM
        2 responses
        24 views
        0 likes
        Last Post algospoke  
        Started by ghoul, Today, 06:02 PM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        46 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        23 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        181 views
        0 likes
        Last Post jeronymite  
        Working...
        X