cBot Error Behaviour

yuval.ein since: 08 May 2020;

  30 Oct 2021, 19:55
cBot Error Behaviour

Is there a way to control what happens on an exception on my cBot. For example, choose if I want to close all positions or do nothing, etc.

Thanks

amusleh's avatar

amusleh since: 01 Mar 2021;

  01 Nov 2021, 08:20

Hi,

You can use try/catch to catch an exception and then do anything you want to.

Community Developer | Spotware | Telegram: @algodeveloper

yuval.ein since: 08 May 2020;

  02 Nov 2021, 10:42
RE:

Is there any way to determine it using some sort of a parameter or via the app's GUI?

Thanks

amusleh's avatar

amusleh since: 01 Mar 2021;

  03 Nov 2021, 08:19
RE: RE:

yuval.ein said:

Is there any way to determine it using some sort of a parameter or via the app's GUI?

Thanks

Hi,

No, its not possible, you have to use try/catch block inside your indicator/cBot code.

Community Developer | Spotware | Telegram: @algodeveloper

yuval.ein since: 08 May 2020;

  03 Nov 2021, 10:31
RE: RE: RE:

A. What does the Stop method does?

B. If I have several instances of the same cBot and one of them calls the Stop, does it effect the other instances?

Thanks

amusleh's avatar

amusleh since: 01 Mar 2021;

  04 Nov 2021, 07:58
RE: RE: RE: RE:

yuval.ein said:

A. What does the Stop method does?

B. If I have several instances of the same cBot and one of them calls the Stop, does it effect the other instances?

Thanks

Hi,

No, it doesn't effect other instances, if you call Stop on a cBot it will only stop the instance that called the method not the other ones.

Community Developer | Spotware | Telegram: @algodeveloper