
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
So I have an EA that works properly and at the OnDeinit() function it exports certain backtesting data from the strategy tester into an excel file.
Such as total trades, winning trades, drawdown etc.
When running the built in strategy tester on individual currency pairs like AUDJPY and it works as it should with a cvs file with the relevent data being created.
However I am trying to do this for multiple currency pairs at once. So I have tried using multiple currency pair simulation built into mt5.
So if im not wrong the Multi currency tester is running the ea on each pair one after the other and showing the results with the data in the Optimization results tab.
But the problem ive hit is that when I run the multiple currency tester it it only creates data for some of the pairs and not all. Changing setting like the inputs or modeling (every tick etc) changes which pairs data I get.
So if im backtesting 8 pairs in the market watch, the excel for one model(every tick, 1 min OHLC) would have the data be only 2 of the 8 pairs, or 3 of the 8 pairs, or none at all sometimes. So the excel doesnt have data for all 8 pairs, just some of them or none at all.
From what I see, is the multicurrency tester running on historical results, so it's not running certain pairs more then once(just calling the trades data from history) thus not running the writeFile() method in the OnDeinit() as the Ea is not run on that currency pair?, ( my code runs fine when backtesting one by one on individual pairs )
If there is any solutions to creating excel on multiple currency pairs at once, any help would be appreciated.
This is the basic code i'm using to write the data to excel file, which is run on OnDeinit(),
It creates one excel file which each row is one currency pairs data, so its appending to the file.(or it should at least im im not mistaken)
/////-----
int testHandle = FileOpen("dataTest.csv",FILE_READ|FILE_WRITE|FILE_CSV|FILE_ANSI,',');
FileSeek( testHandle ,0,SEEK_END);
FileWrite( testHandle ,"Currency:",Symbol(),TesterStatistics(STAT_PROFIT) ......(this line has just more testerStatiscics data thats exported to excel)
FileClose( testHandle );