Strategy · Pine Script v6 · On the chart

RSI Mean Reversion (Long Only)

by Jaden300

This long-only strategy identifies mean-reversion dip opportunities within established uptrends on daily charts.

View on GitHub

GitHub stars4on the repository
Pine versionv6current
Lines of code144
Settings8inputs
LicenceNone stated
Last update5 months ago31 May 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

RSI Mean Reversion (Long Only) opens a position when price is trading above a simple moving average and the Relative Strength Index (RSI) crosses back above a specified oversold entry threshold. Trades exit when RSI hits an overbought level or an intraday percentage stop loss is reached. User settings control the trend SMA length, RSI period, entry and exit thresholds, and stop-loss percentage. The script draws overlays and signal markers directly on the price chart.

Details

Published by

Jaden300 on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Mean reversion, Oscillators & momentum, Moving averages

Markets

Stocks

Timeframes

H4 and above

Risk Notes

  • The strategy enters trades without a stop loss

Topics

algorithmic-tradingbacktestingstock-markettradingview-ideas

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Start Datetimetimestamp("2021-01-01")startDate
Trend MA (SMA)int100trendMa
RSI Lengthint14rsiLength
RSI Entry Levelfloat40.0rsiEntry
RSI Exit Levelfloat70.0rsiExit
Stop Loss %float0.12slPct
Show SignalsbooltrueshowSignals
Color BarsbooltruecolorBars
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

330 stars

This mean-reversion strategy combines multi-timeframe exponential moving averages, Bollinger Bands, and the Relative Strength Index. It generates long and optional short trade signals when price interacts with the Bollinger Bands alongside RSI threshold confir

Strategy v5 Mean reversionMoving averages
Updated 2 months ago · None stated GitHub repository of MEMA + BB + RSI [Alorse]

This strategy draws on the price chart and combines Stochastic RSI, the Money Flow Index, and an exponential moving average to open long or short trades. Longs use the lower oscillator thresholds and shorts use the upper ones, with direction limited to longs,

Strategy v5 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3 Indicator Strategy (StochRSI, MFI & EMA) With Safety Orders
53 stars

This strategy implements Larry Connors' 2-period RSI mean-reversion algorithm overlaid on the price chart. It filters trades using a long-term Simple Moving Average (SMA), entering long positions when the price trades above the SMA and the short-term RSI drops

Strategy v6 Oscillators & momentumMean reversion
Updated 2 months ago · MPL-2.0 GitHub repository of Larry Connors 2-Period RSI Strategy

FVG RSI Strategy (Optimized)

by skywalker0803r
42 stars

This strategy plots on the price chart and trades fair value gaps filtered by RSI and two EMAs. It opens a long when a bullish gap, a rising candle, RSI below the oversold level, and price under both EMAs align, and a short on the opposite conditions. Each tra

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 2 months ago · None stated GitHub repository of FVG RSI Strategy (Optimized)

Burgle Bounce

by benso87
24 stars

Burgle Bounce is a price-chart strategy that treats a move toward one of up to four simple or exponential moving averages as a test when price comes within a user-set percentage of ATR, then exits toward a target average under a separate error margin. Longs an

Strategy v5 Moving averagesOscillators & momentum Repaints
Updated 4 years ago · MPL-2.0 GitHub repository of Burgle Bounce

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers