Skip to content
All library documents

Higher-Timeframe EMA Pullbacks with Candle and MACD Filters

Article Strategy library · Author: coin_a_phrase

Summary

This long-and-short strategy looks for pullbacks toward a short EMA, then checks whether price is moving back across that average. A higher-timeframe comparison of short and long EMAs can restrict longs to an uptrend and shorts to a downtrend. The setup also offers optional confirmation from engulfing candles or long wicks, and from an improving or weakening MACD histogram. The higher-timeframe filter, pullback tolerance and lookback, and confirmation requirements are configurable.

Stops are based on the latest detected pivot low for longs or pivot high for shorts. An optional profit target is calculated as a multiple of the distance from entry price to that stop; the shown default multiple is 1.5. Order size is expressed as a percentage of equity, with a shown default of 10 percent. The excerpt ends during the sizing helper, so it does not show the full order logic or provide backtest results. It also cautions that treating order quantity as units may not reflect broker-specific FX contract sizes or leverage. The script’s execution settings and incomplete excerpt limit what can be concluded about real-world performance.

Key ideas

  • The strategy seeks pullbacks to a short EMA and uses a price move across that EMA as part of its entry setup.
  • A configurable higher-timeframe EMA comparison can filter long and short trades by trend direction.
  • Optional candle-pattern and MACD histogram checks add confirmation to the pullback signals.
  • Pivot lows and highs define candidate stops, while an optional risk-reward multiple sets profit targets.
  • The excerpt provides no performance results and notes that FX quantity assumptions may not match broker contracts or leverage.

Tags

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