44 lines
1.6 KiB
Markdown
44 lines
1.6 KiB
Markdown
# RMA
|
|
|
|
Daniel Bloch's Relative Moving Average framework, ported into a complete
|
|
MetaTrader 5 system.
|
|
|
|
Companion code for the MQL5 article: https://www.mql5.com/en/articles/23693
|
|
|
|
## What it does
|
|
|
|
RMA measures a moving average against price relative to its own recent range,
|
|
rather than reading a raw crossover. That normalisation is what lets the same
|
|
thresholds mean the same thing across symbols and across volatility levels.
|
|
|
|
The port is a full system rather than a single indicator. The engine computes
|
|
the curves, a regime detector reads them, a signal engine turns regimes into
|
|
four distinct strategies, and a trade manager and adverse-move monitor sit
|
|
between the signals and the account.
|
|
|
|
`RMA_Engine.mq5` and `RMA_Panel.mq5` are the chart side. `RMA.mq5` is the
|
|
Expert Advisor. The article reports Strategy Tester results for the four
|
|
strategies.
|
|
|
|
## Layout
|
|
|
|
```
|
|
Include/RMA/RmaTypes.mqh shared types and the buffer contract
|
|
Include/RMA/RmaCore.mqh curve computation
|
|
Include/RMA/RegimeDetector.mqh regime classification
|
|
Include/RMA/SignalEngine.mqh the four strategies
|
|
Include/RMA/TradeManager.mqh order and position handling
|
|
Include/RMA/AdverseMonitor.mqh adverse-move monitoring
|
|
Include/RMA/RmaDisplay.mqh drawing helpers
|
|
Indicators/RMA/RMA_Engine.mq5 the engine indicator
|
|
Indicators/RMA/RMA_Panel.mq5 the panel
|
|
Experts/RMA/RMA.mq5 the Expert Advisor
|
|
```
|
|
|
|
Attach `RMA_Engine.mq5` before the panel, since the panel reads its buffers.
|
|
|
|
## Disclaimer
|
|
|
|
Educational code. Past behaviour of any model or dataset says nothing about
|
|
future results. Test on your own data and broker conditions before drawing
|
|
conclusions.
|