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

Questions about MultiCharts .NET and user contributed studies.
ascales
Posts: 14
Joined: 06 Jan 2017
Has thanked: 3 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: 2089
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1525 times
Been thanked: 1485 times
Contact:

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

Postby JoshM » 01 Sep 2017

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.
These users thanked the author JoshM for the post (total 2):
ascalesHenry MultiСharts

ascales
Posts: 14
Joined: 06 Jan 2017
Has thanked: 3 times

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

Postby ascales » 01 Sep 2017

Thanks for the clear explanation!


Return to “MultiCharts .NET”