Skip to content
All library documents

EMA Crossover Trend Following with Reversal Exits

Article TradingView scripts

Summary

This strategy uses a fast and a slow exponential moving average to classify direction and trade crossovers. With the defaults shown, the fast average uses 12 periods and the slow average uses 21. A cross of the fast average above the slow one opens a long position; a cross below opens a short. The averages change color with their relative ordering, providing a visual trend cue.

Positions are closed when the averages indicate the opposite direction, so the crossover logic reverses exposure as the trend signal changes. The script sets default order size to 10% of equity. It is a simple rules-based template suitable for examining EMA trend-following behavior, but the document supplies no backtest results, asset-specific evidence, transaction-cost assumptions, or risk controls beyond its default sizing. Crossover signals can lag price changes, and results may differ across instruments and timeframes; those effects are not evaluated in the supplied material.

Key ideas

  • The strategy compares a fast EMA with a slow EMA to define the current trend direction.
  • A fast EMA crossover above the slow EMA opens a long position, while a cross below opens a short.
  • An existing position is closed when the averages indicate the opposing direction.
  • The default order size is 10% of equity.
  • The document describes the rules but provides no empirical performance evidence or additional risk controls.

Tags

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