All indicators

MacD 200 Day Moving Average Signal Crossover Strategy

May 11, 2020

Static chart image
SignalsOscillatorsMoving Averages

The MacD 200 Day Moving Average Signal Crossover Strategy indicator provides a systematic trend-following framework by combining MACD momentum oscillators with a long-term moving average filter to identify high-probability entries.

Usage

The script is primarily used to filter momentum signals through the lens of a long-term trend. Users typically apply this to medium-to-high timeframes, such as the 4-hour or Daily charts, to capture significant market swings.

  • Long Entries: Occur when the MACD line crosses above the Signal line while the MACD value is below zero (oversold momentum) and the current price is trading above the 200-period Simple Moving Average (long-term bullish trend).
  • Short Entries: Occur when the MACD line crosses below the Signal line while the MACD value is above zero (overbought momentum) and the price is trading below the 200-period Simple Moving Average (long-term bearish trend).

The indicator includes a "Moving Average Normalized" line which visualizes the distance between the price and the 200 SMA directly on the oscillator pane, allowing for easier trend confirmation without cluttering the main price chart.

Details

The strategy relies on the principle of "mean reversion within a trend." By requiring the MACD crossover to happen below the zero line for longs, it ensures that the trader is entering during a temporary pullback within a larger uptrend (defined by the 200 SMA).

The implementation uses standard MACD calculations where the user can choose between Exponential Moving Averages (EMA) or Simple Moving Averages (SMA) for both the oscillator components and the signal line smoothing. The inclusion of the 200-period SMA acts as a directional bias filter, aiming to prevent "whipsaw" trades that often occur when trading momentum oscillators against the prevailing primary trend.

Settings

  • Fast Length: Sets the period for the shorter moving average used in the MACD calculation (default is 12).
  • Slow Length: Sets the period for the longer moving average used in the MACD calculation (default is 26).
  • Source: Determines the price data used for calculations (default is Close).
  • Signal Smoothing: Sets the length of the EMA/SMA used to smooth the MACD line into the Signal line.
  • Simple MA(Oscillator): A toggle to switch the MACD components from EMA to SMA.
  • Simple MA(Signal Line): A toggle to switch the Signal line calculation from EMA to SMA.
  • Moving Average Length: Defines the period for the trend filter (default is 200).

FAQ

How do I interpret the Histogram colors? The histogram bars indicate both the direction and the strength of momentum. Bright green and bright red indicate accelerating momentum, while darker shades indicate decelerating momentum.

Can I use this strategy for intraday scalping? While the script functions on any timeframe, the 200-period filter is traditionally more effective on higher timeframes (1H, 4H, Daily) to filter out market noise.

How do I get access to the MacD 200 Day Moving Average Signal Crossover Strategy? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.