Discussing the article: "MQL5 Wizard Techniques you should know (Part 57): Supervised Learning with Moving Average and Stochastic Oscillator"
Hi, one attachment is missing SignalWZ_57.mqh

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: MQL5 Wizard Techniques you should know (Part 57): Supervised Learning with Moving Average and Stochastic Oscillator.
Moving Average and Stochastic Oscillator are very common indicators that some traders may not use a lot because of their lagging nature. In a 3-part ‘miniseries' that considers the 3 main forms of machine learning, we look to see if this bias against these indicators is justified, or they might be holding an edge. We do our examination in wizard assembled Expert Advisors.
We continue our look at simple patterns that can be implemented with MQL wizard assembled Expert Advisors. The primary purpose of this is always to pilot or test drive ideas. Eventual deployment and live account use can use manually assembled Expert Advisors after testing over longer periods, but wizard assembled Experts allow quick test runs with less upfront code.
Machine Learning is all the rage at the moment, and we have covered some specific aspects of it in previous articles of these series. We will continue to cover some of these more technical features in this and future articles, however they will be a backdrop since we will be more focused on better known and established indicator patterns.
Furthermore, in the context of machine learning, our articles will cover the 3 main branches of learning in separate articles each, in a cycle. To start off we will look at supervision or supervised-learning and our indicator patterns will be from the pairing of a trend indicator and a momentum indicator. We will be looking at the Moving Average and Stochastic Indicators.
In supervised learning, we will seek to implement each pattern in a separate neural network. These, as argued in recent articles, are better coded and trained in python than MQL5. The efficiency gains are off the charts. Python also easily allows testing for cross validation following a training session, and thus we will be performing these for each pattern.
While cross validation is shared in Python by comparing loss value of test run to loss value of last training epoch, this alone, though important, is bound to be insufficient in assessing the cross validation of the network's current weights and biases.
We will therefore be performing forward walk runs in the MetaTrader 5 strategy tester, with the exported ONNX networks. For this piece, the pricing or x and y datasets that are sent to python from MetaTrader 5 to begin the training will be for the year 2023, for the pair EUR JPY. Therefore, the forward walk will be for the same symbol but the year 2024. We are performing our analysis on the Daily time frame.
Combining the Moving Average (MA) with the Stochastic Oscillator can generate a variety of trading signals. For our testing and exploring purposes, we will only consider the 10 top signal patterns that traders can use when these indicators are combined.
Author: Stephen Njuki