Skip to content
All library documents

Four-EMA Trend Filter with Crossover Entries and Exits

Article TradingView scripts

Summary

This BTCUSDT-oriented strategy combines four exponential moving averages to define broad trend, time entries, and manage exits. The 50-period EMA above the 200-period EMA permits long entries; the reverse alignment permits shorts. A crossover of the 7- and 21-period EMAs triggers entry, while an opposite crossover or a close through the 50-period EMA closes an open position. The script also plots the averages, highlights fully ordered bullish or bearish alignments, and provides alerts.

The document supplies the strategy rules and implementation, but no backtest results, market comparisons, or evidence of profitability. It describes the 7/21 crossover as a pullback signal, though the code does not explicitly test that a pullback occurred. EMA signals can lag and may whipsaw in sideways markets; the stated rules also do not define position sizing beyond the strategy's default equity allocation. Results would depend on chart timeframe, asset, costs, and execution assumptions.

Key ideas

  • The 50/200 EMA relationship filters entries by broad trend direction.
  • A 7/21 EMA crossover triggers a long or short entry aligned with that filter.
  • An opposite fast-average crossover or a close beyond the 50 EMA exits the position.
  • The script adds alerts and background shading for fully ordered EMA trends.
  • No performance evidence is provided, and sideways conditions may produce false signals.

Tags

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