Skip to content
All library documents

Multi-Timeframe EMA Alignment with ATR-Based Exits

Article TradingView scripts

Summary

This framework combines a higher-timeframe trend filter with current-timeframe moving-average crossover signals. It classifies direction by whether price is above or below a higher-timeframe EMA, then opens a long on a fast EMA cross above a slow EMA when the bullish filter holds, or a short on the reverse cross under the bearish filter. The script requests higher-timeframe data without lookahead and plots both local EMAs and the higher-timeframe EMA for context.

Risk controls use ATR to place a stop beyond the average entry price and a profit target at a configurable multiple of that distance. The document explains the broader idea of checking market direction across timeframes, while its code supplies one specific implementation. It provides no backtest results or performance evidence. Signals can change as price data arrives, and alignment does not predict future movement; the approach’s behavior may vary by market, chart timeframe, execution assumptions, and parameter choices.

Key ideas

  • A higher-timeframe EMA provides a directional filter for lower-timeframe entries.
  • Long and short entries are triggered by fast and slow EMA crosses in the direction of that filter.
  • ATR-based stop distances and a configurable reward-to-risk multiple define exits.
  • Trend alignment is a framework for analysis, not a guarantee of profitable trades.

Tags

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