Skip to content
All library documents

MACD Zero-Cross and Moving-Average Momentum Entry Rules

Article MQL5 code base

Summary

This document describes an Expert Advisor built around a momentum entry signal. For a buy, it scans a series of MACD readings for a transition from negative to positive, then checks that the close of a selected bar is above its moving average by a configurable price gap. It also lists trade controls including lot size or free-margin risk, stop loss, take profit, breakeven, trailing stop, and end-of-day position closing.

The article gives parameter descriptions and identifies EURJPY on the hourly chart as a suggested default configuration. It does not explain sell rules, define a complete test methodology, or provide backtest or live-trading results. The stated market and timeframe are therefore configuration guidance, not evidence that the rules are profitable or robust across instruments and conditions.

Key ideas

  • A buy setup looks for MACD to cross from negative to positive within a scanned series of readings.
  • The close of a selected bar must exceed its moving average by a configurable gap.
  • Trade management includes stop loss, take profit or breakeven, and optional trailing stops.
  • The stated default configuration is for EURJPY on an hourly chart, without performance evidence.

Tags

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