Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

error loading strategy

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

    error loading strategy

    good morning, I receive this error when loading the strategy, and I don't understand it well, I don't have a second series of data or anything, only the zigzag indicator is set and when I put another indicator or a simple input logic it gives me this error, help please
    Error calling 'OnBarUpdate' method on bar 0: You are accessing an index with a value that is invalid as it is out of range. That is to say; has access to an array [barsAgo] with a value of 5 when there are only 4 bars in the chart
    06/08/2023 2:03:09 CancelAllOrders: BarsInProgress=0
    06/08/2023 0:00:00 CancelAllOrders: BarsInProgress=1

    #2
    Hello franatas,

    That is a generic error that happens when you try to use data before its available. We would need more details on what you coded to know why that may be happening. You generally need a current bar check if you use any BarsAgo with an indicator or series:

    if(CurrentBar < 5) return;

    5 would be set to the maximum BarsAgo that was used.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    548 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X