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

DOM access within indicator

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

    DOM access within indicator

    I am developing an indicator that analyzes Super DOM using a sample provided on this forum.

    The logic utilizes below event to react to changes in DOM
    private void OnMarketDepth(object sender, MarketDepthEventArgs e)
    {….}

    In order to analyze various levels of DOM, I have the following logic:
    if ( e.MarketDataType == MarketDataType.Ask && e.Position == 0)
    ask = e.Price;
    if ( e.MarketDataType == MarketDataType.Bid && e.Position == 0)
    bid = e.Price;

    This logic gets me the nearest bid and ask prices. However, there are a lot of times when values in either ask or bid are 0. This should not happen as there is always ask and bid even of the spread between them widens.

    Why does this happen?

    Is there a better way of coding to retrieve bid and ask then above?

    Thanks,
    redduke

    #2
    Give us a few more weeks and we will officially support a new method named OnMarketDepth() in both indicators and strategies. This will clearly be documumented and include reference samples for building your own price ladder based on calls to this method.
    RayNinjaTrader Customer Service

    Comment


      #3
      Hi Ray,

      Thanks for the info. Does it mean that Ninja 6.5 will be released within next several weeks?

      Thanks,
      Alex

      Comment


        #4
        We release first beta of NT6.5 within the next few weeks.

        Comment


          #5
          Dierk,

          Am I right to assume that DOM and T&S will be supported in 6.5. I think that was what Ray meant when he said few weeks.

          Thanks,
          redduke

          Comment


            #6
            DOM and T&S displays are supported with NT6. Access to level1 and level2 data will be supported with NT6.5.

            Comment


              #7
              Dierk,

              Sorry I meant to say programatic access to DOM and T&S, the display windows of these features are there already of course.

              redduke

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by alifarahani, Today, 09:40 AM
              6 responses
              31 views
              0 likes
              Last Post alifarahani  
              Started by Waxavi, Today, 02:10 AM
              1 response
              17 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by Kaledus, Today, 01:29 PM
              5 responses
              13 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by Waxavi, Today, 02:00 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by gentlebenthebear, Today, 01:30 AM
              3 responses
              17 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X