if timer is stopped

Created at 05 Nov 2018, 12:51
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!
alexander.n.fedorov's avatar

alexander.n.fedorov

Joined 02.01.2018

if timer is stopped
05 Nov 2018, 12:51


Dear Panagiotis!

I know how to stop the timer. it is just 

Timer.Stop();

But then I have a logic OnTick()

which could only be executed if Timer is stpopped.

It is a boolean condition. How do I say that?

Regards, 

 

Alexander

 

 

 


@alexander.n.fedorov
Replies

PanagiotisCharalampous
05 Nov 2018, 14:20

Hi Alexander,

You can have a flag in your cBot and make it true or false each time you start and stop your cBot.

Best Regards,

Panagiotis


@PanagiotisCharalampous

alexander.n.fedorov
05 Nov 2018, 14:29

Thanks, that is what I did, I thought that there maybe smth more direct in API


@alexander.n.fedorov