3 EMA + Stochastic RSI + ATR
Jun 22, 2021

The 3 EMA + Stochastic RSI + ATR indicator is a trend-following strategy tool designed to capture momentum shifts through the interaction of multiple exponential moving averages and volatility-based risk management. It provides a structured approach to entries by identifying trend alignment across three different time horizons while utilizing the Average True Range (ATR) for dynamic exit positioning.
Usage
The tool is used to identify trend-aligned entry points. A long signal is generated when the Fast EMA is above the Medium EMA, which is in turn above the Slow EMA, provided the price closes above the Fast EMA. Conversely, a short signal is triggered when the EMAs are in a bearish alignment and the price closes below the Fast EMA.
The strategy incorporates built-in risk management where the stop loss is set at a 1x ATR distance from the entry price, and the take profit is set at a 4x ATR distance, offering a 1:4 risk-to-reward ratio. While the Stochastic RSI crossover is calculated within the script, it is currently deactivated for entry confirmation by default but can be manually integrated into the logic for tighter entry filtering.
Details
The script executes based on the "3ESRA" logic, which prioritizes trend confluence. It calculates three distinct EMAs (defaulting to 8, 14, and 50 periods) to establish the primary trend direction. To handle market volatility, it employs the ATR (Average True Range) to determine exit levels, ensuring that stops and targets are proportional to recent price action rather than fixed point values.
Settings
Backtesting range
- Start Date/Month/Year: Defines the beginning of the data range for strategy evaluation.
- End Date/Month/Year: Defines the conclusion of the data range for strategy evaluation.
EMAs
- Fast EMA: Sets the period for the fastest moving average (default 8).
- Medium EMA: Sets the period for the intermediate moving average (default 14).
- Slow EMA: Sets the period for the longest moving average (default 50).
- Source: The price data used for EMA calculations (e.g., Close).
Stoch-RSI
- K/D: Smoothing periods for the Stochastic %K and %D lines.
- RSI Length: The lookback period for the underlying RSI calculation.
- Stochastic Length: The lookback period for the Stochastic calculation applied to the RSI.
- RSI Source: The price data used for the RSI calculation.
ATR
- Length: The lookback period for the Average True Range calculation.
- Smoothing: The moving average method used for the ATR (RMA, SMA, EMA, or WMA).
FAQ
How do I use the 3 EMA + Stochastic RSI + ATR for entries?
Entries are signaled when the three EMAs align in order (Fast > Medium > Slow for longs) and the price closes on the correct side of the fast EMA.
Can I change the risk-to-reward ratio?
The current version uses a fixed 1:4 ATR-based ratio. Users can modify the multiplier in the script's source code to adjust the Take Profit and Stop Loss distances.
How can I access 3 EMA + Stochastic RSI + ATR?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.