Discussing the article: "MQL5 Wizard Techniques you should know (Part 71): Using Patterns of MACD and the OBV"

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 71): Using Patterns of MACD and the OBV.
The Moving-Average-Convergence-Divergence (MACD) oscillator and the On-Balance-Volume (OBV) oscillator are another pair of indicators that could be used in conjunction within an MQL5 Expert Advisor. This pairing, as is practice in these article series, is complementary with the MACD affirming trends while OBV checks volume. As usual, we use the MQL5 wizard to build and test any potential these two may possess.
The Moving Average Convergence Divergence oscillator, a trend tracking oscillator (MACD) is paired with the On Balance Volume oscillator (OBV). These two complement each other since one tracks trend while the other measures volume. We perform tests using the pair GBP JPY on the year 2023 with the year 2024 serving as a forward walk test window. Our ‘training’ or optimization for the year 2023; besides seeking the ideal pattern signal weight; also seeks entry price gaps and take-profit targets. This is all done while no stop-loss is being used, meaning we rely solely on the close threshold weight of the custom signal class to close any positions that are no longer inline with their open thesis.
The test reports presented below show profits mostly but this does not necessarily mean successful forward walks because the test period also includes the period over which the Expert Advisors are optimized. This has been our approach throughout these series and is set to continue. Therefore, readers need to consider this when interpreting the test report results; besides the very short test window.
We test 10 signal patterns, one at a time, that are guided by these rules:
Indexing is from 0 to 9 allowing us to easily compute the map value for their exclusive use by the Expert Advisor. For instance, if a pattern is indexed 1 then we have to set the parameter ‘PatternsUsed’ to 2 to the power 1 which comes to 2. If the index is 4 then this is 2 to the power 4 which comes to 16, and so on. The maximum value that this parameter can be assigned, meaningfully, is 1023 since we have only 10 parameters. Any number between 0 and 1023 that is not a pure exponent of 2 would represent a combination of more than one of these 10 patterns.
Author: Stephen Njuki