Is there any difference? I assume indicators could be processing real-time data without auto-trading being enabled?
Difference between Environment.IsRealTimeCalc and ...IsAutoTradingMode? [SOLVED]
Questions about MultiCharts .NET and user contributed studies.
3 posts • Page 1 of 1
- Posts: 2099
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1527 times
- Been thanked: 1498 times
ascales wrote:Is there any difference? I assume indicators could be processing real-time data without auto-trading being enabled?
That's true, for indicators `Environment.IsRealTimeCalc` can be used while they cannot use `Environment.IsAutoTradingMode` reliably.
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.
Thanks for the clear explanation!