Skip to content
All library documents

EMA Trend Direction with RSI Confirmation and ATR Exits

Article Strategy library · Author: glencole_aitd

Summary

This script describes a trend-following system that aligns a fast and slow EMA with RSI confirmation. With defaults of 9 and 21 periods for the EMAs and 14 periods for RSI, it considers longs when the fast EMA is above the slow EMA and RSI is above 50; shorts require the opposite alignment. Entries are allowed only when the strategy has no open position. ATR sets a stop at 1.5 times its value from the current close and a target at twice that distance.

The script also specifies a 1% risk-per-trade input, a commission assumption, slippage, and no pyramiding. However, the input is passed directly as order quantity, so it does not by itself calculate position size from account equity and stop distance. The stop and target are recalculated from each bar's close, which may cause levels to move rather than remain fixed from entry. No market, date range, backtest results, or robustness evidence are supplied. The strategy is thus a rule template, and its sizing and exit behavior warrant careful review before evaluation.

Key ideas

  • EMA alignment defines trend direction, while RSI above or below 50 confirms the corresponding bias.
  • New positions are opened only when the strategy has no existing position.
  • ATR multiples define stop and target levels from the current close.
  • The risk input is used as order quantity and does not calculate equity-based risk sizing.
  • The document provides no backtest results or evidence across markets and periods.

Tags

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