That window that opens after the backtest completes

 
   // I would like to access that chart that opens AFTER the backtest is complete.
   // Not the one created for the visual mode, this one: https://youtu.be/VqyxCRXdCls 
   // That one that shows all the orders / deals outside strategy tester
   // I would like to automaticaly access it as soon as the backtest is complete.

// Is it even possible? // This code running in the strategy tester. Backtest, with no optimization.

   void OnDeinit(const int reason)      {       Print(ChartID()); // Returns 12345, the chart from the strategy tester visualization, not the one I want       // Trying to access all the open charts       long chartID=ChartFirst();       while(chartID>=0)         {          // Only one interation, even if there's many charts open          // That's kinda expected, cause it's running in the strategy tester sandbox context          // So it can't see the other charts          chartID=ChartNext(chartID);         }       Print(chartID); //Returns 12345, the chart from the strategy tester visualization, not the one I want       ObjectCreate(chartID,"Test",OBJ_TEXT,0,0,0); // Wrong chart id.              // Probably OnDeinit is not the way to go, because it's in the strategy tester context. // But how?      }
 

No it's not possible from the backtested EA, the chart is open AFTER the deinit event.

You need to do it from an other EA (or the same EA but running in the terminal not the backtester).

 
Alain Verleyen:

No it's not possible from the backtested EA, the chart is open AFTER the deinit event.

You need to do it from an other EA (or the same EA but running in the terminal not the backtester).

Thank you for your answer.

Do you see any way to trigger any kind of even outside the strategy tester as soon as the backtest ends?

For exemple: I could add a script to a chart and save is as the default template. So as soon as the backtest ends that chart that I want to access (it would be great if it had a name) will open, load the default template and by consequence my script.

It works, but requires this modification of the default template so the script will load in any chart.

I'm trying to find a way to include this triggering in the expert code.