Next you can find some prints from an strategy with Calculate set OnBarClose. Strategy includes three instances of an indicator with Calculate set OnEachTick within indicator code, and to maintain this property, within strategy OnStateChange - Historical , Calculate is set to OnEachTick.
When load, historical data looks as expected, but when real time arrives, the secuence is not equal.
Is this setup correct? The goal is run an strategy with Calculate -> OnBarClose with indicators with Calculate -> OnEachTick
Historical
Strategy - State: Historical Calculate: OnBarClose CurrentBAR: 4015 Indicator X with period - 2 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4016 Indicator X with period - 6 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4016 Indicator X with period - 10 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4016 Strategy - State: Historical Calculate: OnBarClose CurrentBAR: 4016 Indicator X with period - 2 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4017 Indicator X with period - 6 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4017 Indicator X with period - 10 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4017 Strategy - State: Historical Calculate: OnBarClose CurrentBAR: 4017 Indicator X with period - 2 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4018 Indicator X with period - 6 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4018 Indicator X with period - 10 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4018 Strategy - State: Historical Calculate: OnBarClose CurrentBAR: 4018 Indicator X with period - 2 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4019 Indicator X with period - 6 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4019 Indicator X with period - 10 bars - State: Historical Calculate: OnEachTick CurrentBAR: 4019
Strategy - State: Realtime Calculate: OnBarClose CurrentBAR: 4019 Strategy - State: Realtime Calculate: OnBarClose CurrentBAR: 4020 Strategy - State: Realtime Calculate: OnBarClose CurrentBAR: 4021 Indicator X with period - 2 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4020 Strategy - State: Realtime Calculate: OnBarClose CurrentBAR: 4022 Indicator X with period - 2 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4021 Indicator X with period - 6 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4020 Indicator X with period - 10 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4020 Strategy - State: Realtime Calculate: OnBarClose CurrentBAR: 4023 Indicator X with period - 2 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4022 Strategy - State: Realtime Calculate: OnBarClose CurrentBAR: 4024 Indicator X with period - 2 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4023 Strategy - State: Realtime Calculate: OnBarClose CurrentBAR: 4025 Indicator X with period - 2 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4024 Indicator X with period - 6 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4021 Indicator X with period - 6 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4022 Indicator X with period - 6 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4023 Indicator X with period - 10 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4021 Indicator X with period - 10 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4022 Indicator X with period - 10 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4023 Indicator X with period - 6 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4024 Indicator X with period - 10 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4024 Strategy - State: Realtime Calculate: OnBarClose CurrentBAR: 4026 Indicator X with period - 2 bars - State: Realtime Calculate: OnEachTick CurrentBAR: 4025
Comment