ATTENTION! Save the signal module file to “Data folder”\MQL5\Include\Expert\Signal\”. The easiest way is the following — in the search bar of MetaEditor (upper right corner) enter “SignalMAAboveBelow” and then follow the instruction: How to download free trading robots from the MetaTrader 4/5 Code Base?
The module of trading signals “SignalMAAboveBelow.mqh” on the basis of the Moving Average signal module, only generates one signal type: whether the price is above or below the Moving Average.
Signals:
- The “BUY” signal — the price is above the Moving Average
- The “SELL” signal — the price is below the Moving Average
Signal Module parameters:
- Reverse, bool, false — signal reverse: “BUY” and “SELL” signals are reversed
- PeriodMA, int, 12, — averaging period
- Shift, int, 0 — the horizontal shift of the indicator
- Method, ENUM_MA_METHOD, MODE_SMA — smoothing type
- Applied, ENUM_APPLIED_PRICE, PRICE_CLOSE — price type
Based on this signal, Expert Advisors can be created using the MQL4/MQL5 Wizard – MetaEditor. When you need this signal, search by “Signals of indicator ‘Moving Average Above Below‘”: