Error in optimization
Created at 11 Feb 2019, 20:47
Error in optimization
11 Feb 2019, 20:47
I write a Robot and when I want to optimize it I face an error "Crashed in OnBar with NotSupportedException: Chart operations are not supported in optimization".I move the code from onBar() method to onTick() I got the same error. what is the problem?
11/01/2019 00:00:00.000 | Backtesting started
11/01/2019 02:00:00.000 | Crashed in OnTick with NotSupportedException: Chart operations are not supported in optimization
11/01/2019 02:00:00.000 | Backtesting was stopped
Replies
contact.bitq
11 Apr 2020, 13:29
I faced this issue today, here solution
I pass RunningMode of cBot as indicator's parameter. and then in the indicator:
if (cBotRunningMode != RunningMode.Optimization) {
// do chart operation here
}
@contact.bitq
PanagiotisCharalampous
12 Feb 2019, 09:28
Hi pozhy,
As the message says, you are using operations that are not supported in optimization. Do you draw objects on charts?
Best Regards,
Panagiotis
@PanagiotisCharalampous