Skip to content
All library documents

EMA Crossover Strategy with Dollar-Based Stops and Trailing Exits

Article TradingView scripts

Summary

This strategy enters long when a faster EMA crosses above a slower EMA and short when it crosses below. Trading can be restricted to a 15-minute chart and weekdays. On a reversal signal, the script closes the existing opposing position before opening the new direction. Its exits combine a fixed dollar stop with a trailing stop that activates after a favorable move and follows price at a configured distance; there is no fixed profit target. The script also tracks and plots entry, stop, and reconstructed trailing levels.

The code specifies full-equity sizing, leverage-related margin settings, and zero commission assumptions, while disabling intrabar recalculation. It includes illustrative dollar distances, but provides no strategy report or performance evidence in the supplied text. The dollar-to-tick conversion and behavior may depend on the symbol’s tick size, and the backtest assumptions omit trading costs. The narrow timeframe filter and weekday option further constrain where the strategy is intended to operate.

Key ideas

  • Entries are triggered by crossovers between a fast and a slow exponential moving average.
  • Optional filters restrict trades to a selected intraday interval and weekdays.
  • The strategy closes an opposing position when a crossover signals a reversal.
  • A fixed stop is paired with a trailing stop that activates after a favorable price move.
  • The displayed script settings and code do not establish profitability under realistic execution costs.

Tags

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