Processing initial bars load in indicator

 

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...

 
  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.
Reason: