How to Lock Account for Live Account

Created at 05 Apr 2017, 04:28
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!
KO

korakodmy

Joined 17.07.2016

How to Lock Account for Live Account
05 Apr 2017, 04:28


Hello everyone , Now I have cBots , I want to lock account to use for live account not to use public

How to code , Thank you very much


@korakodmy
Replies

kricka
07 Apr 2017, 22:58

Live accounts

Have a look at the API, Internals. Here is a link to read more about it. 

/api/reference/internals/iaccount/islive


@kricka

tradermatrix
09 Apr 2017, 16:18

RE:

korakodmy said:

Hello everyone , Now I have cBots , I want to lock account to use for live account not to use public

How to code , Thank you very much

If c is to lock the live accounts (demo available) I can give you an example with a robot

 


@tradermatrix

kricka
20 Apr 2017, 22:16

Only demo accounts

A demo version "only" can be coded with a few lines of the code of the cBot.

protected override void OnStart()

{

if (Account.IsLive)
                Stop();
         else
                Print("This is a demo account and the cBot is running");  

}

 


@kricka