Is there any difference? I assume indicators could be processing real-time data without auto-trading being enabled?
Thanks.
Difference between Environment.IsRealTimeCalc and ...IsAutoTradingMode? [SOLVED]
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Difference between Environment.IsRealTimeCalc and ...IsAutoTradingMode? [SOLVED]
That's true, for indicators `Environment.IsRealTimeCalc` can be used while they cannot use `Environment.IsAutoTradingMode` reliably.Is there any difference? I assume indicators could be processing real-time data without auto-trading being enabled?
But there are more differences. For instance, in playback mode, `Environment.IsRealTimeCalc` returns `true` while auto-trading doesn't work in that mode.
And when a script doesn't calculate on real-time data, `Environment.IsRealTimeCalc` returns `false`. But the strategy can still have auto-trading enabled then, and so `Environment.IsAutoTradingMode` can return `true` then.
For more details, see Environment.IsAutoTradingMode and Environment.IsRealTimeCalc.