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

MarketDepthRow initialization

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

    MarketDepthRow initialization

    It seems like when OnMarketDepth is first called, the entire depth is not pulled for instruments like CL using MarketDepthRow. As time goes on and new updates are received, the totals appear in the DOM and on the indicator in MarketDepthRow. Is there a way to get all the values for the depth when an indicator requests the OnMarketDepth so the cumulative values are initialized correctly?

    Attached Files
    Last edited by habibalex; 09-18-2018, 06:48 PM.

    #2
    Hello habibalex,

    Thank you for your note.

    If you install the Sample Addon Framework from the following link, open the addon and press the ask ladder, you'll see the values printed to the output window right away. You could use the approach for pulling the ladder the Addon Framework uses for a quicker pull of these values.



    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      In the add-on framework it appears to be iterating through the positions of each MarketDepthRow for only rows that have been updated. It doesn't pull all the last values from the depth when it loads. Thus it is waiting for the next update to load the latest values. How do I get all the last values from the feed?

      For example in CL the first 20 values load quickly.:
      ASK LADDER
      Position: 0 Price: 70.74 Volume: 1

      and about 3 minutes later I see:
      Position: 42 Price: 72.18 Volume: 11
      Position: 43 Price: 72.28 Volume: 11

      Comment


        #4
        Hello habibalex,

        Within the AddonFramework, which logic are you referring to which limits it to updates? When I click Ask Ladder/Bid Ladder the values appear instantaneously.

        Did you download the newest version of the framework at the link in the previous post?

        Who is your data provider?

        I look forward to your reply.
        Last edited by NinjaTrader_AlanP; 09-19-2018, 03:18 PM.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          data provider is CQG. I downloaded the latest. It's not the updates are limited. It's that when the framework loads, the MarketDepth appears to only show new updates that happen after the button is clicked. It doesn't seem to show old values.

          For example say position 50 is currently at 100. I press the AskLadder button. No Depth updates occur for 30 seconds, then position 50 updates to 101. Then 101 is printed in the output. How it should work is that as soon as I press the AskLadder button, all positions current values are retrieved. Then it prints updates from that point on.

          Comment


            #6
            Hello habibalex,

            How you expect it to work is how I'm seeing it on my end.

            If you connect to the simulated data feed and try pulling the ladder, are you still seeing the same results?

            I look forward to your reply.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              I am expecting there to be a way to pull all the last values from the depth feed provided by the CME. On other platforms they do not have this trickle in loading update issue.

              Comment


                #8
                Hello habibalex,

                Thank you for the reply.

                the MarketDepth appears to only show new updates that happen after the button is clicked. It doesn't seem to show old values.
                In this situation what you are seeing is correct, there would be no way to pull this data historically. The data is only going to be available while you are subscribed to it and will only be the values going forward from that point in time.


                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by CortexZenUSA, Today, 12:53 AM
                0 responses
                1 view
                0 likes
                Last Post CortexZenUSA  
                Started by CortexZenUSA, Today, 12:46 AM
                0 responses
                1 view
                0 likes
                Last Post CortexZenUSA  
                Started by usazencortex, Today, 12:43 AM
                0 responses
                5 views
                0 likes
                Last Post usazencortex  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                168 responses
                2,265 views
                0 likes
                Last Post sidlercom80  
                Started by Barry Milan, Yesterday, 10:35 PM
                3 responses
                11 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Working...
                X