3 EMA Stochastik RSI ATR SL TP only LONG
May 5, 2021

The 3 EMA Stochastik RSI ATR SL TP only LONG indicator is a comprehensive trend-following tool designed to identify momentum-based entries while managing risk through volatility-based exit levels. It combines triple Exponential Moving Averages (EMA) for trend filtering, Stochastic RSI for momentum timing, and the Average True Range (ATR) for dynamic stop-loss and take-profit calculations.
Usage
The script is primarily designed for long-side trend following, though it includes optional short-side logic. A valid long setup occurs when the EMAs are in a "stacked" bullish formation (EMA 8 > EMA 14 > EMA 50) and the price closes above the fastest EMA. The actual entry trigger is generated when the Stochastic RSI K-line crosses above the D-line, provided the MACD is below its zero line but showing upward momentum.
The script offers two primary exit methods:
- ATR Exit: Automatically calculates a stop loss and take profit based on a multiple of the current ATR at the time of entry.
- Lowest Low/Highest High Exit: Sets the stop loss at a recent swing point (lowest low for longs) and calculates a profit target based on the resulting risk-to-reward ratio.
Details
The strategy relies on a multi-confluence approach to ensure trades are taken in the direction of the established trend. The three EMAs provide a structural filter, ensuring the short-term and medium-term momentum aligns with the long-term trend. The inclusion of MACD filters prevents entering too late into an extended move, specifically looking for entries where the MACD is still below the zero line. The script also includes a backtesting time range filter, allowing users to analyze performance over specific historical periods.
Settings
Time Range
- FromMonth/Day/Year: Sets the starting date for historical backtesting.
- ToMonth/Day/Year: Sets the ending date for historical backtesting.
Logic Toggles
- Enable Long/Short: Enables or disables directional entries.
- Enable ATR Exit: Activates volatility-based take profit and stop loss.
- Enable Lowest Low/Highest High Exit: Activates swing-point based exit logic.
Indicators
- Stoch RSI: Configures the smoothing (K/D), RSI length, and Stochastic length.
- MACD: Sets the fast/slow lengths and signal smoothing, with options for Simple or Exponential Moving Averages.
- ATR: Adjusts the lookback period for the Average True Range volatility calculation.
- Multi EMA: Defines the three lookback periods for the trend filter (default 8, 15, 50).
Exit Factors
- Profitfactor/Stopfactor: Multipliers applied to the ATR or risk-to-reward ratio to determine exit levels.
- Lowest Low/Highest High Lookback: The window used to find swing points for manual exit logic.
FAQ
How do I use the 3 EMA Stochastik RSI ATR SL TP only LONG?
This tool is used by identifying periods where the EMAs are correctly ordered and waiting for a Stochastic RSI crossover signal to confirm a momentum entry.
Can I trade short positions with this?
While the title suggests "Only Long," the script includes "Enable Short" settings in the inputs that can be toggled to allow for two-way trading logic.
How can I access this script?
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.