2 EMA + Stoch RSI + ATR Strategy

Jan 21, 2023

Static chart image
Support and Resistance
Signals
Oscillators
Moving Averages
Volatility

The 2 EMA + Stoch RSI + ATR Strategy indicator is a comprehensive trend-following tool that combines moving averages, momentum oscillators, and volatility-based risk management to identify high-probability entry and exit points.

Usage

The strategy is designed to capture pullbacks within an established trend. It utilizes a dual-filter system to ensure trades are taken in the direction of the long-term momentum while entering at optimal exhaustion points.

Long Entry Conditions:

  • Trend Filter: The 50 EMA must be above the 200 EMA.
  • Pullback: Price closes below the 50 EMA.
  • Momentum: The Stochastic RSI must enter the oversold region (below 20).
  • Confirmation: A bullish crossover occurs on the Stochastic RSI, forming a higher low compared to the previous crossover.

Short Entry Conditions:

  • Trend Filter: The 50 EMA must be below the 200 EMA.
  • Pullback: Price closes above the 50 EMA.
  • Momentum: The Stochastic RSI must enter the overbought region (above 80).
  • Confirmation: A bearish crossover occurs on the Stochastic RSI, forming a lower high compared to the previous crossover.

Exit Strategy: The script automatically calculates an ATR-based stop-loss and a fixed Reward-to-Risk (RR) take-profit level. It also includes an optional breakeven feature that moves the stop-loss to the entry price once a specific RR target is reached.

Details

This strategy implements a trend-confirmation logic using two Exponential Moving Averages (EMAs). The 200 EMA acts as the primary trend baseline, while the 50 EMA serves as a dynamic support/resistance level for pullbacks. The Stochastic RSI provides the timing mechanism, specifically looking for "Higher Lows" in oversold territory for longs and "Lower Highs" in overbought territory for shorts to filter out weak momentum. Volatility is accounted for via the Average True Range (ATR), which dynamically adjusts the stop-loss distance to prevent premature exits during high volatility.

Settings

Backtesting Window

  • Start/Finish Year, Month, Day: Defines the date range for the strategy backtest.

EMA

  • EMA Length 1: The period for the fast EMA (default 50).
  • EMA Length 2: The period for the slow EMA (default 200).

Stochastic RSI

  • K / D: Smoothing periods for the Stochastic RSI components.
  • RSI Length: The lookback period for the underlying RSI calculation.
  • Stochastic Length: The lookback period for the Stochastic calculation.

ATR Stoploss Finder

  • Length: The period used for ATR calculation.
  • Smoothing: The moving average type used to smooth the ATR (RMA, SMA, EMA, WMA).
  • Multiplier: Multiplier applied to the ATR to determine the stop-loss distance.
  • Show ATR Bands: Toggles the visibility of the ATR-based stop-loss levels on the chart.

Profit Target

  • Reward to Risk ratio: Sets the take-profit level as a multiple of the initial risk.
  • Move SL to breakeven: When enabled, the stop-loss shifts to the entry price once the price reaches the defined Breakeven RR.

FAQ

How do I use the 2 EMA + Stoch RSI + ATR Strategy?

Apply the script to your chart and ensure the trend filters (EMAs) align with your timeframe. Monitor the Stochastic RSI for overbought/oversold crossovers that meet the higher-low/lower-high criteria for confirmation.

Can I change the risk settings?

Yes, the risk is fully customizable via the ATR Multiplier and the Reward to Risk ratio settings in the script inputs.

How can I access 2 EMA + Stoch RSI + ATR Strategy?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.