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 atrader, Today, 09:29 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by nailui, Today, 07:26 AM
            1 response
            29 views
            0 likes
            Last Post NinjaTrader_Spencer  
            Started by chartchartchart, Today, 08:08 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Emily  
            Started by andreslazor7, Today, 08:08 AM
            3 responses
            16 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by FatCanary, Today, 08:09 AM
            2 responses
            10 views
            0 likes
            Last Post FatCanary  
            Working...
            X