Discussing the article: "Feature Engineering With Python And MQL5 (Part I): Forecasting Moving Averages For Long-Range AI Models"
The result shown looks promising; will try this out.
More of this kind please.
Thanks.
MetaQuotes:
The article Trait Engineering with Python and MQL5 (Part I) has been published: AI models for long-term forecasting on moving averages:
Author: Gamuchirai Zororo Ndawana
Some of the pictures are not showing...


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
Check out the new article: Feature Engineering With Python And MQL5 (Part I): Forecasting Moving Averages For Long-Range AI Models.
The moving averages are by far the best indicators for our AI models to predict. However, we can improve our accuracy even further by carefully transforming our data. This article will demonstrate, how you can build AI Models capable of forecasting further into the future than you may currently be practicing without significant drops to your accuracy levels. It is truly remarkable, how useful the moving averages are.
The last we spoke of forecasting moving averages with AI, I provided evidence that suggested the moving average values are easier for our AI models to predict than future price levels, the link to that article is provided here. However, for us to be confident that our findings are significant, I trained 2 identical AI models on more than 200 different market symbols and compared the accuracy of forecasting price against the accuracy of forecasting the moving average and the results appear to show that our accuracy levels drop on average by 34% if we forecast price over of the moving averages.
On average, we can expect 70% accuracy when forecasting the moving averages, compared to an expectation of 52% accuracy when forecasting price. We are all aware that, depending on your period, the moving average indicator does not follow price levels very closely, for example, price may fall over 20 candles while the moving averages are rising over the same interval. This divergence is undesirable for us because it is possible for us to predict the moving average future direction correctly, but price may diverge. Remarkably, we observed that the rate of divergence remains fixed around 31% across all markets, and our ability to forecast divergences averaged at 68%.
Additionally, the variance of our ability to forecast divergence and the occurrence of divergence was 0.000041 and 0.000386 respectively. This shows that our model is capable of correcting itself with a reliable level of skill. Members of the community looking to apply AI into long-term trading strategies should consider this alternative approach on higher time frames. Our discussion is limited to the M1 for now because this time frame ensures we will have sufficient data across all 297 markets so we can make fair comparisons.
There are many possible reasons why the moving averages are easier to predict than the price itself. This may be true because predicting moving averages is more inline with the idea of linear regression, than predicting price is, namely Linear regression assumes the data is a linear combination (sum) of several inputs: Moving averages are a summation off previous price values, this means the linear assumption is true. Price itself is not a simple summation of real-world variables, it is a complex relation between many variables.
Author: Gamuchirai Zororo Ndawana