Discussing the article: "MQL5 Wizard Techniques you should know (Part 92): Using B-Tree Indexing and a Bayesian NN in a Custom Signal Class"

 

Check out the new article: MQL5 Wizard Techniques you should know (Part 92): Using B-Tree Indexing and a Bayesian NN in a Custom Signal Class.

In this article we present yet another custom MQL5 Signal Class that we are labelling ‘CSignalBTreeBayesian’. We are marrying the algorithm of a balanced tree with a neural network that is built on Bayesian principles to formulate yet another custom signal testable independently or with other signals thanks to the MQL5 Wizard.

As strategies change from single-asset analysis to more complex setups of multi-symbol portfolios, the design limitations of some MQL5 in-built data structures can come to the fore. When an Expert Advisor must triangulate pricing data, correlations, or divergence across multi-currency pairs, coders usually default to multidimensional arrays. However, arrays are not flexible, by design. They tend to be flat and need to be hard-coded, and nested into loop iterations in order to cross-reference historical states. As strategies scale—an increasingly common requirement—this brittle architecture can produce convoluted, error-prone code that adapts poorly.

Standard arrays do not have native relational state-management; out-of-the-box, they cannot map hierarchical or temporal relationships between different market variables without excessive custom scaffolding. We therefore embark on having a tool to natively handle relational data. Another issue we want to tackle in this article is dependence on deterministic entry models as is the case with most of the technical indicators, as well as supervised networks. It can be argued that traditional signal classes that rely on these are bound to suffer from an illusion of certainty. These mechanically output "buy" and "sell" signals devoid of not just a confidence interval, but entirely based on what has worked in the past and no undertaking of new exploration.


Author: Stephen Njuki