Skip to content
All library documents

Higher-Timeframe EMA Pullbacks with Candle and MACD Confirmation

Article TradingView scripts

Summary

This FX-agnostic template defines long and short pullback entries using a higher-timeframe EMA direction filter and lower-timeframe signals. The short EMA and long EMA determine the higher-timeframe bias; a qualifying setup requires price to have approached the short EMA within a recent lookback, then satisfy a directional close condition. Optional confirmation uses an engulfing candle or a long wick and improvement or deterioration in the MACD histogram for long or short entries, respectively.

Stops use the latest confirmed pivot low for longs or pivot high for shorts. An optional profit target is set as a multiple of the entry-to-stop distance, while order quantity is based on a percentage of equity. The script exposes parameters for timeframes, averages, pullback tolerance, confirmation filters, pivot detection, and sizing. It does not report backtest results or establish profitability. The author’s note also cautions that TradingView’s FX quantity treatment ignores broker-specific contract sizes and leverage, so sizing may not reflect actual account risk.

Key ideas

  • The higher-timeframe relationship between short and long EMAs sets the permitted trade direction.
  • Entries require a recent touch near the short EMA and a close on the trade side of that average.
  • Engulfing or wick patterns and MACD histogram movement are optional entry filters.
  • The latest confirmed swing pivot supplies the stop, and an optional reward target scales the stop distance.
  • Equity-based quantity in the script may not represent broker-specific FX exposure, and no performance results are supplied.

Tags

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