Trabalho concluído
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Termos de Referência
The important part of the project is the auto-optimization of the entry conditions using the System Quality Number Score as the optimization criteria.
I am not concerned about the profitability because the rule below are bogus. The focus is on the auto-optimization.
You may use your own auto-optimization function or you can use the following link as an excellent starting point: https://www.mql5.com/en/code/19392
The auto-optimisation has to be embedded in the attached EA called Optimization_EA without altering any existing functions. Please make code additions understandable by commenting your work.
====================================================================================================================================
AUTO OPTIMISATION ADDED TO THE FOLLOWING ENTRY CONDITIONS ONLY:
if(TradeLong) {
bool LongEntryCondition = (((High[3] < High[5]) && (High[19] < iMA(NULL, 0, pEMA_4, 0, MODE_EMA, PRICE_CLOSE, 1))) && (((High[19+1] > iMA(NULL, 0, pEMA_6, 0, MODE_EMA, PRICE_CLOSE, 2)) && (High[19] < iMA(NULL, 0, pEMA_6, 0, MODE_EMA, PRICE_CLOSE, 1))) && (High[11] > High[16])));
if(LongEntryCondition == true) {openPosition(1);
}
}
// SHORT: (((Low(3) > Low(5)) And (Low(19) > EMA(pEMA_4))) And ((Low(19) Crosses Above EMA(pEMA_6)) And (Low(11) < Low(16))))
if(TradeShort) {
bool ShortEntryCondition = (((Low[3] > Low[5]) && (Low[19] > iMA(NULL, 0, pEMA_4, 0, MODE_EMA, PRICE_CLOSE, 1))) && (((Low[19+1] < iMA(NULL, 0, pEMA_6, 0, MODE_EMA, PRICE_CLOSE, 2)) && (Low[19] > iMA(NULL, 0, pEMA_6, 0, MODE_EMA, PRICE_CLOSE, 1))) && (Low[11] < Low[16])));
if(ShortEntryCondition == true) { openPosition(-1);
}
}
Please contact me with any questions.