Skip to content
All library documents

EMA Crossover Entries with RSI Filters and ATR Risk Sizing

Article TradingView scripts

Summary

This long-only strategy combines a fast and slow exponential moving average crossover with an RSI filter. It opens a position when the fast average crosses above the slow average and RSI lies between the configured oversold and overbought thresholds. It exits on a bearish average crossover or when RSI rises above the overbought level.

Position size is estimated from current strategy equity and a chosen per-trade risk percentage, divided by the ATR-based stop distance, then rounded down to whole units. The script sets a stop one ATR below the current close and a profit target at a configurable multiple of ATR; it also includes chart labels, alerts, and a commission assumption. The inputs use example defaults for the averages, RSI, ATR, risk fraction, and reward multiple.

The document supplies rules and code but no backtest results or market-specific evaluation. The sizing estimate assumes the ATR distance represents the amount at risk per unit, while actual fills, gaps, contract multipliers, and instrument constraints may affect realized risk. Only long entries are implemented.

Key ideas

  • A bullish fast-over-slow EMA crossover triggers a potential long entry when RSI is between its thresholds.
  • A bearish crossover or an overbought RSI reading closes an open long position.
  • The quantity estimate divides a selected fraction of equity by the ATR stop distance and rounds down.
  • The strategy places an ATR-based stop and a profit target set by a configurable reward multiple.
  • The source provides no performance evidence, and realized risk can differ from the sizing estimate.

Tags

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