The expert is ready for the tests. It, as well as a set of settings, can be downloaded in the Downloads section on this page. When we tested the classic Moving Average, we found more profitable trend interpretation methods. It would be fair and correct to add the application of these methods to these tests too.
The number of parameters that need to be selected has become quite large. Therefore, we will have to resort to genetic optimization. Fortunately, the strategy tester built into MetaTrader 5 has such capabilities. It makes sense to repeat the optimization 3 times, this will be enough for the algorithm to determine the best parameters. Gold (XAUUSD), timeframe H1 and 13 years of real history - let's go.
Let's select the parameters on the site for optimization and find IMP_opti.
The best parameters are: Period = 135, Mode = AMA, Price = Low, Phase = 50, Step = 6001, Shift = 0, Open BUY Strategy = ghost cross MA, Open SELL Strategy = ghost cross MA.
IMP_opti = 3.77. The balance line is fairly flat and the recovery factor is almost 5. If we had also tightened the profit factor (it is only 1.5), then we would have an almost ready-made trading system. I would like to draw your attention to the fact that this result was obtained by constantly being in the market. There will be no delay and we will move on to the most important and interesting thing – work on a site that was not involved in the selection of parameters.
And here, to be honest, a surprise awaited us. The parameters we found coped with an unfamiliar area with almost no loss of efficiency. The PC indicator (Prediction Coefficient) is close to 100%.
IMP_opti = 3,77
IMP_all = 3,37
PC =89%
RBTI = 3,5
Evaluate the difference in passing an unfamiliar flat section compared to the usual Moving Average. You can clearly see this in the attached picture.
When passing through a flat area, the usual Moving Average (MA) shows significant disadvantages compared to other types of moving averages. The main problem with MA in flat is its excessive smoothness and lag. The indicator tries to follow a trend that does not actually exist, which leads to a lot of false signals and a late reaction to real price changes.
At the same time, the adaptive moving average (AMA) shows significantly better results in the flat due to its higher sensitivity to current price changes. It reacts faster to price fluctuations and provides more relevant trading signals.