Debugging EA with historical data

 

Hello, 

 

I would like to debug my EA (using the debug facility of MetaEditor) on the weekend, when the markets are closed. So I would need to debug it without live data, just with historical ones. 

I couldn't find a way to do so.

Anyone knows?

 

thanks,  

 

I already suggested this to the ServiceDesk and they responded may be later.

But you can ask for it too so that it might come sooner than later?

But you can put the function to be debugged either in OnInit() or in OnTimer() these are working even when the market is closed.

And you can use the quotes of the chart: from (i=Bars-1;i>=0;i--){..}

 

Hello 

 

Thanks, Gooly,  do you mean it's not possible to debug on historical data at the moment? Wow that's a massive lack of MT4 I'll suggest it to SD right away. 

 It means that EAs can only be worked on during market hours, and if you have a rule to only trade on new candles, then you can only debug on the 1M chart and during market hours, and still you waste a lot of time. 

thanks,  

 

Well debugging on real chart is tricky too: as the debugger waits for your next-step-click while the market keeps on 'running'.

Debugging with the 'old' bars (every bar is a new bar!) of the chart is quite ok and this works even on now on a Sunday - just put your Is-New-bar-Code in a functions and call it in OnInit().

 

Thanks for the suggestion, I guess that's the only way forward for the moment. I've suggested the feature to the service desk, I hope this will facilitate them to pick it up.

I'll try placing the function call in the OnInit function as you recommend.

  

I find this is a nasty workaround, as a principle I tend to debug the final code of my applications, rather than a modified version made just to deal with the lacks of the testing software.

Sorry for the grumble.