Please assist with a seemingly straightforward issue. I've attached two scripts for your reference: a Strategy ("TestStrategyRealtimePrint") and an Indicator ("TestRealTimePrint"). These scripts serve as learning tools for me, helping to refine my understanding of how Indicators function when hosted within a Strategy.
The Indicator prints the time of bars after it enters the State.Realtime, hence excluding the time of historical bars. This script performs as intended when applied directly to a chart.
However, I'm encountering some unexpected behavior when the Indicator is hosted by the Strategy. When applied to a chart, the Strategy prints the time of bars after it enters the State.Realtime, However, it also (unexpectedly) prints the time of historical bars.
Any insight or guidance is appreciated. I'm keen to learn why the Indicator behaves differently when used within the context of the Strategy.
Thank you in advance for your time and assistance.
Shannon
Comment