How to test if a bot is trading the Live market?

Created at 02 Sep 2023, 15:45
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
GH

ghcaplan

Joined 15.08.2019

How to test if a bot is trading the Live market?
02 Sep 2023, 15:45


Sorry for the basic question but I'm stuck.

I can see the IsBacktesting() test and the RunningMode.RealTime test.

But I can't see how to distinguish whether a bot running in real time is on a Demo server or a Live server.

Please advise!

//////////////////////////////////

Edit - figured it out. For anyone else stuck with this, what you need is:

 Account.IsLive

//////////////////////////////////


@ghcaplan