Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error OnBarUpdate

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

    Error OnBarUpdate

    Please see attached.

    I am sure there is not any value of 5 bars in the code...

    Any idea?

    Thanks

    Click image for larger version

Name:	01_07_2020_1617.jpg
Views:	179
Size:	25.1 KB
ID:	1107535

    #2
    Hello Impeesa,

    Thank you for your post.

    The error you are getting doesn't mean that you're actually trying to access an bars ago of 5, that's simply an example of one reason you might get this particular error.

    This can often occur if you are trying to access a value for a bar but there is not a valid value to be accessed. To narrow down the cause, I would suggest adding some prints to the indicator to see what the values that you're accessing on are on each bar. This will help you narrow down which line is causing the error.

    This forum post goes into great detail on how to use prints to help figure out where issues may stem from — this should get you going in the correct direction.



    If you run into issues like we saw here, the above information will allow you to print out all values used in the condition in question that may be evaluating differently than you might expect. With the printout information you can assess what is different between bars where the indicator runs properly and when it hits the above error.

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    647 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X