Error in optimization

11 Feb 2019, 20:47Error in optimization#1
pozhyposts: 23since: 03 Apr 2018

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

 

 

12 Feb 2019, 09:28#2
Panagiotis Charalampousposts: 2610since: 13 Jan 2017

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


Head of Community Management at cTrader