Skip to content
All library documents

MACD Zero-Cross Signals with Moving-Average EA Breakout Entries

Article MQL5 code base

Summary

This Expert Advisor uses MACD and a moving average to identify a directional setup, then enters only after price breaks the signal bar’s range. When a new bar appears, it checks whether MACD crossed the zero line on the preceding bar. A detected signal causes the bar’s high and low to be recorded while the system waits for price to move beyond either level.

For the sell example, a break below the signal bar’s low triggers a short position, while a break above its high cancels the setup. The EA allows only one open position at a time, so the description says it can operate on both hedging and netting account types. The text does not fully specify the corresponding buy rules, position exits, risk controls, or the moving average’s exact role. It provides no backtest results or evidence that the approach is profitable.

Key ideas

  • A MACD zero-line cross on the prior bar identifies a potential signal bar.
  • The strategy records the signal bar’s high and low and waits for a price breakout.
  • In the sell example, a low break opens a short and a high break cancels the setup.
  • The EA maintains at most one position at a time.
  • The description omits exit rules and performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.