Discussing the article: "MQL5 Wizard Techniques you should know (Part 68): Using Patterns of TRIX and the Williams Percent Range with a Cosine Kernel Network"

 

Check out the new article: MQL5 Wizard Techniques you should know (Part 68): Using Patterns of TRIX and the Williams Percent Range with a Cosine Kernel Network.

We follow up our last article, where we introduced the indicator pair of TRIX and Williams Percent Range, by considering how this indicator pairing could be extended with Machine Learning. TRIX and William’s Percent are a trend and support/ resistance complimentary pairing. Our machine learning approach uses a convolution neural network that engages the cosine kernel in its architecture when fine-tuning the forecasts of this indicator pairing. As always, this is done in a custom signal class file that works with the MQL5 wizard to assemble an Expert Advisor.

Of the ten signal-patterns, we examined in the last article, only 3 were able to forward walk. These patterns were generated from combining indicator signals of the TRIX, a trend indicator and the Williams Percent Range (WPR), a support/ resistance oscillator. The training/ optimizing of the Expert Advisor was restricted to just one year, 2023, with the forward walk being performed over the subsequent year, 2024. We were testing with CHF JPY on the 4-hour time frame.

In extending our patterns that forward walk with machine learning, we typically use Python because it codes and trains networks very efficiently. This is true even without a GPU. In past articles, we have been prefacing with Python implementations of the functions of patterns that were able to forward walk. For this article, we will touch on the indicator implementations in Python, but mostly dwell on the network setup that takes the indicator signals as inputs. It is a convolutional 1-Dim network that uses the cosine kernel in its designs.

Author: Stephen Njuki