unfair rule for Multi pairs EA
I do not want to be rude, but I think you should optimize your code. I created a tick-indicator (it is recalculated every time a new tick arrives - that's about 80000 calculations a day!) and it can be tested in less than a minute for the last year.
song_song has the point. Multiple symbol EA cannot rely on chart tick, you may lost momentum on some other symbols. For this purpose, i am using timer event to update all symbols concurrently. It made my EA time become much longer.
I must say i am quite agree with song_song. I am having hard time to adjust my EA to meet the required time :(
- www.mql5.com
Do your EAs write to files or read from them? Because that slows down the testing of an EA very much!
My EA check history deal and record the profit and then change lot weight of every symbol. And I have to write lot weight to file since they say terminal may be exit and restart in ATC
fireflies:
Have you tried global variables instead?
Hi all,
Regarding suggestion by fireflies, my experience, i use global var and do a loop for 12 pairs and it take more longer time.
Have you tried global variables instead?
Dear song song,
the example (3 pairs) , if i am wrong please correct me. tq
string input_Symbol; input string Q1="EURUSD"; input string Q2="EURAUD"; input string Q3="EURGBP"; double WPR_eurusd[]; int WPR_handle_eurusd; double WPR_euraud[]; int WPR_handle_euraud; double WPR_eurgbp[]; int WPR_handle_eurgbp;
int OnInit()
WPR_handle_eurusd =iWPR("EURUSD",PERIOD_M30,14);
WPR_handle_euraud =iWPR("EURAUD",PERIOD_M30,14);
WPR_handle_eurgbp =iWPR("EURGBP",PERIOD_M30,14);
void onTick()
string PairsDisplay[4];
PairsDisplay[1] = ""+Q1+"";
PairsDisplay[2] = ""+Q2+"";
PairsDisplay[3] = ""+Q3+"";
double xwpr[4];
xwpr[1]=WPR_eurusd[0];
xwpr[2]=WPR_euraud[0];
xwpr[3]=WPR_eurgbp[0];
// looping
double lotac;
int jxmd=3;
for(int i=1;i<=jxmd-1;i++)
{
double priceclosegeneric=CopyClose(PairsDisplay[i],PERIOD_M30,0,8,kCloseM30); //example
if (xwpr[i]>70) lotac=6; //example
/// your code here ....in term of [i] array including array on technical indicator
}
If the testing of an Expert Advisor takes more than 20 minutes, it will not pass the check due to excessive consumption of resources.
The rule is unfair for Multi pairs EA!
if only one pair spend 5 minutes, so if an EA trade 6 pairs, it could be spend 5*6=30 minutes
please, modify the rule!!!
change to: 10 minute per symbol