int OnInit() { //--- if(TS >= TP) return(INIT_PARAMETERS_INCORRECT); if(TS == 0) { if(PP >= SL + TP) return(INIT_PARAMETERS_INCORRECT); } else { if(PP >= SL + TS) return(INIT_PARAMETERS_INCORRECT); } //--- return(INIT_SUCCEEDED); }
if(UseMA && MAPeriod!=15) { return(INIT_PARAMETERS_INCORRECT); }
if (UseMA) { do this code } else { do this code instead, which would include MAPeriod=M15; // or however the program recognizes it }
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
Hi,
Yet trying to ease the optimization process of an EA, I'm wondering how to exclude sub-param if the main param is turned to on - in a way to win time.
Example :
Any help appreciated. Thanks.