Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Index error

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

    Index error

    Hi!

    I have a similar issue.

    This is what I read in my Log:
    Indicator 'INEFFICIENZE': Error on calling 'OnStateChange' method: Index was outside the bounds of the array.
    How can I find which index and array the message refers to?

    #2
    Hello Gianpiero,

    For that type of error you would need to debug the code inside of the indicators OnStateChange to find which line is throwing an error. Generally you would comment out the code leaving just the base indicator structure and find a point where you can apply it without seeing the error. Once you reach that point you can uncomment 1 line at a time in OnStateChange to see which line is having a problem. Once that is known you could make a forum post about that line if the problem is not apparent.

    Comment


      #3
      Thanks Jesse!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      72 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      39 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X