Difference between Environment.IsRealTimeCalc and ...IsAutoTradingMode?  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
ascales
Posts: 36
Joined: 06 Jan 2017
Has thanked: 4 times
Been thanked: 2 times

Difference between Environment.IsRealTimeCalc and ...IsAutoTradingMode?

Postby ascales » 01 Sep 2017

Is there any difference? I assume indicators could be processing real-time data without auto-trading being enabled?

Thanks.

User avatar
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]

Postby JoshM » 01 Sep 2017

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.

ascales
Posts: 36
Joined: 06 Jan 2017
Has thanked: 4 times
Been thanked: 2 times

Re: Difference between Environment.IsRealTimeCalc and ...IsAutoTradingMode?

Postby ascales » 01 Sep 2017

Thanks for the clear explanation!


Return to “MultiCharts .NET”