RSI + Close previous day
May 25, 2023

The RSI + Close previous day indicator is a mean-reversion strategy tool designed to identify short-term oversold conditions and exit positions once price momentum recovers relative to the previous day's high.
Usage
The strategy is primarily utilized on daily (D1) timeframes, specifically showing historical performance on indices like the SPY or S&P 500 Mini Futures. The logic facilitates a "buy the dip" approach by entering long positions when the 2-period RSI drops below a specific threshold (default is 15).
The strategy remains in the trade until a recovery signal is triggered. This occurs when the current bar's closing price exceeds the previous day's high price, suggesting that the bearish momentum has subsided and the asset is returning to its mean.
Details
The script relies on two main quantitative concepts:
- Short-term Mean Reversion: By using a very short RSI period (2), the indicator captures extreme, temporary price fluctuations rather than long-term trends.
- Price Action Confirmation: The exit logic does not rely on the RSI returning to a neutral zone, but rather on price action breaking above a significant local resistance level (the prior day's high). This ensures the trade is closed during a period of strength.
Settings
- RSI Period: Sets the lookback period for the Relative Strength Index calculation. A lower value increases sensitivity.
- RSI Lower Level: Defines the oversold threshold required to trigger a long entry.
- Price Source: (Internal) The strategy uses the closing price for RSI calculations and entry/exit triggers.
FAQ
How do I access RSI + Close previous day?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Which timeframe is best for this strategy?
While the script can be applied to various timeframes, it is optimized for the Daily (D1) chart to capture daily mean-reversion cycles.
Can I change the oversold threshold?
Yes, the RSI Lower Level can be adjusted in the script settings to make the entry criteria more or less conservative depending on the asset's volatility.
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.