How to restart a running robot?

Created at 10 May 2017, 17:05
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!
CT

ctid320188

Joined 19.04.2017

How to restart a running robot?
10 May 2017, 17:05


Hi all,

Does anyone know a way of restarting a running robot from the robot code itself?

Odd as it sounds I know, but my problem is as follows:

My bot runs just fine and will cashout all my positions under a given logic condition and then I would like the robot to "reload" itself so it starts up again with all the values reset as if it had been run for the first time.

I can call OnStart() but I then need to make sure ALL the values etc have been reset.

Just wonder if there is such a thing as ReStart().

Cheers


@ctid320188
Replies

kricka
11 May 2017, 20:22

If the values are from parameters, the values will be intact when restarting. The problem is there is no function or method within cAlgo to carry out a restart. A method would be gladly accepted by programmers so we have more control when a cBot is stopped and is needed to be restarted again.


@kricka

alexsanramon
12 Jul 2019, 05:46

Will this work?

RefreshData()

 


@alexsanramon