MJT
03-25-2009, 08:57 AM
While debugging a problem, I've come accross something that does not look right. The indictor runs with CalculateOnBarClose = false, and uses FirstTickOfBar to perform some tracking that must only be done once per bar.
The chart is setup before a session start time (not yet updating with realtime data), then on the first bar of the new session the code that runs within FirstTickOfBar is executed twice on that bar. This can cause my tracking variables to hold incorrect values. If the indicator is reapplied during the session, then it will only perform FirstTickOfBar once on that first bar. I have used Tick and Range chart types, Ninja version is 6.5.1000.8
I beleive I now have a work-around, but is this a bug or expected behavoir?
The chart is setup before a session start time (not yet updating with realtime data), then on the first bar of the new session the code that runs within FirstTickOfBar is executed twice on that bar. This can cause my tracking variables to hold incorrect values. If the indicator is reapplied during the session, then it will only perform FirstTickOfBar once on that first bar. I have used Tick and Range chart types, Ninja version is 6.5.1000.8
I beleive I now have a work-around, but is this a bug or expected behavoir?