Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MarketDepthEventArgs.Price is always set to zero for row removal operations

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

    #46
    Hi Josh,

    Well setting the bars required to zero fixes one of the problems. However, there's still the problem with strategies not receiving the same market depth events as indicators which I explained earlier to Bertrand. Is this the issue you cannot replicate?

    Thanks
    Last edited by ScoobyStoo; 06-02-2010, 04:08 AM. Reason: Typo

    Comment


      #47
      We will get back to you at a later point in time on that one as well. Thanks.
      Josh P.NinjaTrader Customer Service

      Comment


        #48
        ScoobyStoo,

        When running with Market Replay please ensure you actually have bars on your chart prior to the playing of the replay to ensure you receive full events from indicators and strategies.
        Josh P.NinjaTrader Customer Service

        Comment


          #49
          Sorry Josh, I don't understand. How can I generate bars prior to replaying the data when it is the act of replaying the data that generates the bars. Can you provide step-by-step instructions please that will ensure the sample code functions correctly when replaying downloaded data through both indicators and strategies.

          Thanks.

          Comment


            #50
            ScoobyStoo, what Josh referred to was having for example one day of historical data loaded prior to replaying the 'current' day, you can control this via the Bars to Load property when creating the chart for your replay.

            Comment


              #51
              Any update on this??? I am using the code within a strategy, and it takes a while for the book to populate. I need this data as soon as the strategy starts (or a few seconds after).

              Is there a solution to this problem?
              Last edited by pmorissette; 08-25-2010, 01:19 PM.

              Comment


                #52
                pmorissette,

                The solution is to be sure you have data loaded prior to replay start. If you are replaying 8/24, be sure you actually have bars loaded prior to 8/24 so when the 8/24 replay starts everything is in order already. Having no bars prior to replay start is the source of the issue discussed in this thread.
                Josh P.NinjaTrader Customer Service

                Comment


                  #53
                  Actually I was talking about real-time trading, not recorded. I seem to be having a problem where it takes time to generate the DOM with live data in a strategy, but not with the indicator, nor with simulated data in the strategy.

                  In addition, if I use the code with "Simulated data feed", then I don't have a problem. I understand that there is more "activity" with the simulated feed, but I am currently testing on ES 09-10, so there should be no shortage of activity in the order book....


                  Any ideas?
                  Last edited by pmorissette; 08-25-2010, 01:22 PM.

                  Comment


                    #54
                    Sorry I am not sure I follow you. OnMarketData and OnMarketDepth are only available in real-time. Meaning they will only be available as real-time data rolls in. There is no way to just instantly generate old parts of it right as you start up any script.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #55
                      Ok nevermind what I said.

                      Here is the problem. When I use an indicator, it generates the book quickly.

                      When I use the same code in a strategy (in OnMarketDepth), it doesn't generate the book quickly (over 30 seconds sometimes).

                      What gives?

                      Comment


                        #56
                        Here is a clear example:

                        Two files - 1 indicator (L2Tester.cs) 1 strategy (L2Testing.cs).

                        Note the difference in time it takes to populate the table....why????

                        I am testing on ES 09-10
                        Attached Files

                        Comment


                          #57
                          For one, your scripts are not identical. One is a multi-series script and another is not. In the multi-series script you are using the exact same LadderRows list for both BarsInProgress. This means you are adding both BIP market information into the same row while in the strategy you only have one bars object and thus would not have as many in the list object. Strategies also have a parameter called BarsRequired. This means a strategy does not begin processing until that setting is satisfied.
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #58
                            Sorry I actually commented that out while testing to see if it would change anything. Doesn't seem to matter though..

                            Comment


                              #59
                              The comment still stands. You are using the same object for two different series. I suggest you simplify things and completely remove the secondary series as it just overly complicates the task at hand.
                              Josh P.NinjaTrader Customer Service

                              Comment


                                #60
                                Ok so does this mean my strategy has to use CalculateOnBarClose = false?

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                606 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                351 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                105 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                560 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                561 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X