Processing initial bars load in indicator

To add comments, please log in or register
kyjak
7
kyjak  

Hello,

when you create an indicator and attach it to a chart, a buffer of bars is fed to the indicator.

Is there a way to tell that these are history bars and not the realtime stream in the indicator?

I tried a "newBar" function, but this works on history too, simply getting a new bar in the past...

whroeder1
17940
whroeder1  
  1. All bars except current bar (zero) are "history bars." Always.
  2. NewBar doesn't belong in indicators. See How to do your lookbacks correctly and your loop updates all bars.
To add comments, please log in or register