ChartOpen not working in backtesting

 
Hi everyone,

While backtesting my EA in visualisation mode, I want it to draw many diagrams with shapes, lines, text, numbers etc. that are periodically updated during the testing period. 

I figured the best way to do this was to open a new chart for each diagram, and use a canvas on each chart to draw each diagram.

I got the canvas working well on the primary symbol chart, but I can't get any additional charts to open.

the following lines of code are executed in OnInit() and return 0 0

   ResetLastError();
   long chart_id = ChartOpen("EURUSD",PERIOD_M1);
   printf("%i",chart_id);
   printf("%i",GetLastError());

I also tried the same 4 lines in OnTick() and it returns 0 4101
I looked up error code 4101 and the description is "Wrong chart ID"
which doesn't make any sense to me :/



 
J Sky :
Hi everyone,

While backtesting my EA in visualisation mode, I want it to draw many diagrams with shapes, lines, text, numbers etc. that are periodically updated during the testing period. 

I figured the best way to do this was to open a new chart for each diagram, and use a canvas on each chart to draw each diagram.

I got the canvas working well on the primary symbol chart, but I can't get any additional charts to open.

the following lines of code are executed in OnInit() and return 0 0


I also tried the same 4 lines in OnTick() and it returns 0 4101
I looked up error code 4101 and the description is " Wrong chart ID"
which doesn't make any sense to me :/



'ChartOpen' does not work in 'Debug on historical data' mode. Use the 'Debug on real data' mode.