Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Failed to call method 'Initialize' for indicator 'PivotPointsMR': Index was outside t

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

    Failed to call method 'Initialize' for indicator 'PivotPointsMR': Index was outside t

    Failed to call method 'Initialize' for indicator 'PivotPointsMR': Index was outside the bounds of the array. error on Log
    Attached Files

    #2
    Not able to find why this error pop up,attached indicator can someone take a look whats wrong with this indicator thanks in advance

    Comment


      #3
      Hello niks.baps, and thank you for your question. This is telling you that the code you have on lines 78-91 are acting on Plot data that has not yet been prepared. I would like to recommend moving this code to OnBarUpdate and setting up a boolean flag so that this only executes once. Please let us know if there are any other ways we can help.
      Jessica P.NinjaTrader Customer Service

      Comment


        #4
        Thanks Jessica

        actually I'm new to programming I try to move code under OnbarUpdate

        But same issue for me

        If you could help me to fix this issue that will a big help

        Comment


          #5
          While we can not provide direct debugging services, for educational purposes, I am attaching a version of your code with a safe way to accomplish your goal. You have further runtime log messages from your Plot method that you will need to review. If you would like the services of a NinjaScript consultant please let us know and I will ask a colleague to assist further.
          Attached Files
          Jessica P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          133 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          75 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          117 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          113 views
          1 like
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          90 views
          0 likes
          Last Post CarlTrading  
          Working...
          X