Creating an MQL5 Signal Generator for a Custom Indicator Model
Summary
The article explains how to build an MQL5 Expert Advisor signal module around a custom indicator model by subclassing the standard signal base class and implementing its settings, indicator initialization, and long and short condition methods. It uses MACD to illustrate defining additional market models beyond the standard ones: a rising MACD below zero is treated as a prospective long condition, while a falling MACD above zero is treated as a prospective short condition.
The implementation discussion covers organizing the include file, adapting an existing signal class template, and using pattern weights and usage checks to enable or disable individual models. Model zero is part of the signal framework's pattern structure; it is not itself a universal signal rule. The article provides code-oriented construction guidance but no backtest results, out-of-sample analysis, or evidence that the proposed MACD conditions predict returns. The rules are examples to evaluate, not validated trading advice.
Key ideas
- A custom MQL5 signal module can inherit from the standard Expert Advisor signal base class.
- The example defines a rising MACD below zero as a possible long condition and a falling MACD above zero as a possible short condition.
- Pattern weights and usage checks let the signal framework include or exclude specified models.
- The article explains implementation structure but does not supply evidence that its example rules are profitable.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.