Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on calling 'OnMarketDepth'

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

    Error on calling 'OnMarketDepth'

    I have installed the version 7.0.18 and I have performed a strategy that up to the version 17 worked. Now it appears me the following error:

    **NT** Error on calling 'OnMarketDepth' method for strategy 'BrunoBooksBase0012_Stop_simulato/821b97711d4b44068cf59ee3b9c9e57e': You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.

    From thing it is due and as I can correct?
    thanks.

    #2
    Hello onurbbruno,

    Can you share the code that is causing this?

    To resolve, can use Try-Catch to identify where the exception is.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Perhaps I have already resolved the problem. I had a window of opened DOM. Closing is not repeated her/it anymore the error. If it will still happen I will do as you have pointed out me, I will send you the code, to individualize the exception. Thanks you are always very fast and effective.

      Comment


        #4
        Thanks for letting know. I will pass it on to Ryan.

        Enjoy the upcoming Holiday weekend and Happy Trading!!
        Vince B.NinjaTrader Customer Service

        Comment


          #5
          I have implemented the 'OnMarketDepth' method in three strategies. Activating only all and three the strategies the first one in order of activation is activated, in regular way and without errors. The others instead two jam and introduce the following error :
          " You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart. ".


          As it is possible to avoid this error and block of the strategies?
          Thanks.

          Comment


            #6
            onurbbruno, to clarify - are you working alongside the NT7 code sample for OnMarketDepth() here?

            http://www.ninjatrader.com/support/f...ead.php?t=3478
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by op1031, Yesterday, 05:16 PM
            1 response
            8 views
            0 likes
            Last Post NT-Roland  
            Started by sinpeople, Today, 07:20 AM
            1 response
            3 views
            0 likes
            Last Post NT-Roland  
            Started by Frank1000, Today, 03:05 AM
            1 response
            7 views
            0 likes
            Last Post NT-Roland  
            Started by ntdev, Today, 01:14 AM
            4 responses
            16 views
            0 likes
            Last Post ntdev
            by ntdev
             
            Started by ct, Today, 02:22 AM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Jason  
            Working...
            X