Combining Indicator Signals with Category-Theory Products in MQL5
Summary
The article introduces category-theory products as a way to pair values from two indicator domains while retaining each value, then illustrates the idea in an MQL5 expert-advisor signal class. DeMarker and Williams Percent Range readings are mapped into long and short condition values. Weighted combinations of the paired values produce buy and sell scores, with separate weights for each direction.
The article also discusses products, coproducts, and universal properties as abstract tools for reasoning about combined financial instruments and portfolios. It refers to a real-tick test on EURJPY over much of 2022 and describes the system as imperfect, but the supplied excerpt gives no detailed performance statistics. The broader risk-management discussion is conceptual: it proposes representing instruments and positions with domains and mappings, without a concrete risk model or validation. The code excerpt illustrates an implementation pattern, not evidence that category theory improves trading results.
Key ideas
- A product can represent paired values from two indicator domains while preserving their individual components.
- The example maps DeMarker and Williams Percent Range readings into separate long and short scores.
- Weighted indicator values are combined to produce buy and sell condition strengths.
- The article presents a EURJPY real-tick test but supplies no detailed performance measures in the excerpt.
- Category-theory applications to portfolio risk are proposed conceptually rather than demonstrated empirically.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.