I modified the prepackaged BuySellVolume indicator to expose a third public property which is a data series that contains the order delta for each bar (Buys-Sells).
I am debugging with some Print statements, which print the CurrentBar and my calculated value for the preceding bar. It runs along fine for a bit until it reaches some point where it freaks out and quickly spits out some values from old bars with incorrect values in quick succession? You can see the bars in red below were already processed before hand.
What can cause an indicator to reprocess old bars?
( It is possible that this only happens when I am running a strategy on top of the indicator, I haven't been able to narrow that down 100% yet. My Indicator and strategy both calculate on EachTick
...
CurrentBar is 9793 delta for BarID: 9792 was: 8
CurrentBar is 9794 delta for BarID: 9793 was: -89
CurrentBar is 9795 delta for BarID: 9794 was: 34
CurrentBar is 9796 delta for BarID: 9795 was: -11
CurrentBar is 9797 delta for BarID: 9796 was: -27
CurrentBar is 9798 delta for BarID: 9797 was: -147
CurrentBar is 9790 delta for BarID: 9789 was: -240
CurrentBar is 9791 delta for BarID: 9790 was: 0
CurrentBar is 9792 delta for BarID: 9791 was: 0
CurrentBar is 9793 delta for BarID: 9792 was: 0
CurrentBar is 9794 delta for BarID: 9793 was: 0
CurrentBar is 9794 delta for BarID: 9793 was: 0
CurrentBar is 9799 delta for BarID: 9798 was: 40
CurrentBar is 9800 delta for BarID: 9799 was: 88
....
Comment