Tendency EMA + RSI
Oct 31, 2021

The Tendency EMA + RSI indicator tool is a strategy designed to capture trend-following opportunities by combining triple Exponential Moving Averages (EMA) for trend identification with the Relative Strength Index (RSI) for momentum-based exits.
Usage
The strategy identifies entries based on moving average crossovers filtered by a long-term trend baseline and manages exits through momentum thresholds or time-based conditions.
Long Entry Conditions:
- The short-term EMA (default 10) crosses above the medium-term EMA (default 20).
- The short-term EMA is currently above the long-term EMA (default 100).
- The candle closes bullish (close > open).
Short Entry Conditions:
- The short-term EMA crosses below the medium-term EMA.
- The short-term EMA is currently below the long-term EMA.
- The candle closes bearish (close < open).
Exit Conditions:
- RSI Threshold: Positions are closed when the RSI exceeds 70 (for longs) or drops below 30 (for shorts).
- Time-based Exit: If enabled, the strategy will close a position after a specific number of bars have passed, provided the trade is currently in profit.
Details
The script utilizes three distinct EMA lengths to define market "tendency." The interplay between the 10 and 20 EMAs acts as the primary signal generator, while the 100 EMA serves as a trend filter to ensure trades are taken in the direction of the broader market bias. By integrating RSI for exits, the strategy attempts to capture the meat of a move before a potential reversal occurs at overbought or oversold levels.
Settings
Strategy
- Long entries: Toggles the execution of long positions.
- Short entries: Toggles the execution of short positions.
- Close after X # bars: Enables a time-based exit condition if the trade is in profit.
- # bars: Defines the number of candles required to trigger the time-based exit.
RSI
- Length: The lookback period for the Relative Strength Index calculation.
- Source: The price data source used for the RSI calculation.
Moving Averages
- EMA A Length: The period for the short-term EMA (Entry signal).
- EMA B Length: The period for the medium-term EMA (Entry signal).
- EMA C Length: The period for the long-term EMA (Trend filter).
FAQ
How do I use the Tendency EMA + RSI strategy?
You can apply the script to your chart and adjust the EMA lengths to suit your specific timeframe. It is best used in trending markets where the 100 EMA provides a clear directional bias.
What is the purpose of the "Close after X # bars" setting?
This setting acts as a trailing time-stop that only triggers if the position is in profit, allowing you to lock in gains if the RSI exit hasn't been hit after a significant duration.
How can I access this tool?
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.