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

MarketDeept & -Data to spot Icebergs

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

    MarketDeept & -Data to spot Icebergs

    Hi traders,

    there are some vendors offering iceberg detector indis for NT. So I thought I try coding one. In theory, the code should detect when the number of offered contracts on one side is more than the last trade should have subtracted. E.g. before there were 10 offers at the bid and after a trade at the bid of size 3 there are still 9 contracts at the bid.
    In practice, I am not sure how to request the current amount of contracts offered?
    Because both, OnMarketData and OnMarketDeepth are only called when there is an update. Therefore it can be that there happen 10 trades, and you first get the amounts offered at the bid or ask, when it is updated again. This way, you can't know how many contracts are offered after a trade. What is the workaround here?
    Or is the next bid/ask update after a trade in the end the actual contracts offered without newly offered ones added?

    Did anyone spot icebergs successfully?


    Greetings,
    Seykool
    Last edited by seykool; 02-14-2022, 06:12 AM.

    #2
    Hello seykool,

    Thank you for your note.

    This is mostly a level 2 related thing, to examine market depth, and to track number of contracts/shares by market maker.

    I can clarify that OnMarketData shows level 1 trades, whereas the level 2 data from OnMarketDepth would represent resting bids/offers.

    We also have an example on using OnMarketDepth to create your own order book that may be helpful.



    I could not comment and do not have an example on how you could relate the OnMarketDepth removals with trades from OnMarketData. You could try examining OnMarketDepth only for identifying icebergs in a way described by Investopedia, and we will leave the thread open for community feedback as well. Please see the publicly available Investopedia link below:

    https://www.investopedia.com/terms/i...20given%20time.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hi Kate,

      it seems like OnMarketData shows resting bid and ask orders of the order book on position 0. In other words, it always shows what OnMarketDeepth shows on position 0. Since this is where the next trade deducts volume, it is all that is necessary.
      The question is whether the next OnMarketData/OnMarketDeepth_position0 shows the updated resting orders after a trade, or whether it first and only shows resting orders after someone placed a new limit order there. I hope you can tell me this technical matter as a NT intern.

      Greetings

      Comment


        #4
        If there was a way to consult the current resting orders at position 0, this would be the solution.
        Last edited by seykool; 02-14-2022, 11:55 AM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Salahinho99, 05-05-2024, 04:13 AM
        5 responses
        47 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by ttrader23, Yesterday, 09:04 AM
        7 responses
        30 views
        0 likes
        Last Post ttrader23  
        Started by goodknight777, Today, 08:43 AM
        0 responses
        2 views
        0 likes
        Last Post goodknight777  
        Started by damethetrader, Today, 08:31 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by reynoldsn, Today, 07:23 AM
        3 responses
        7 views
        1 like
        Last Post NinjaTrader_Gaby  
        Working...
        X