how to use EA on a offline chart

 

just like M2 or M3 chart

 

https://www.mql5.com/en/code/7673 but this is a little tricky to use (in "MT5" it comes original)

 

You can directly attach EAs to offline charts, but you need to make some modifications.

EAs attached to offline charts only run init() function, but DON'T run start() for new ticks.

You can insert a infinite loop to run start() in init(), and Sleep() certain time in every loop. (Don't forget to RefreshRates() every loop.)

Reason: