Pine Library · 657 open-source scripts

Free Mean Reversion Pine Scripts (page 9)

Open-source Pine scripts that bet on a stretched price returning to its average: band fades, oscillator extremes and statistical tools.

Pine scripts657
Code shown here317open licence
Updated in a year411
No repaint flag586

Mean reversion: Indicators, Strategies and Libraries

Talons VWAP + Volume

by muammeryldrm42
1 stars

A strategy that trades crosses of price through VWAP when volume is higher than its 20-bar average by a set multiple. A cross up with a volume spike opens a long and a cross down opens a short, one position at a time. The stop is an ATR multiple from entry and

Strategy v5 VolumeMean reversion
Updated 5 months ago · None stated GitHub repository of Talons VWAP + Volume

Hammers and Stochastic Strategy

by gabriel-klettur
1 stars

Hammers and Stochastic Strategy overlays signals on the price chart by combining candlestick pattern detection with the Stochastic oscillator. It identifies standard hammer and inverted hammer candles and validates them with Stochastic oversold and overbought

Strategy v5 Candlestick patternsOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Hammers and Stochastic Strategy

Advance VWAP

by nvFede
1 stars

A Pine v4 overlay that calculates a volume-weighted average price which restarts at the beginning of each day, using the typical price by default. The line turns green when rising and red when falling. Two more lines sit two standard deviations of the VWAP ove

Indicator v4 VolumeMean reversion
Updated 3 years ago · None stated GitHub repository of Advance VWAP

This indicator builds a channel from a Hull moving average of the source and an ATR scaled by a band multiplier, then normalizes price inside that channel into a 0 to 100 oscillator. It smooths the result with a weighted moving average and plots the line in a

Indicator v6 Mean reversionVolatility & bands
Updated 3 months ago · None stated GitHub repository of Radiant Mean Reversion Channels [Pineify]
4 stars

This strategy overlays the price chart and switches among RSI-2 mean reversion, SuperTrend, MACD crossover, triple EMA, Bollinger Bands, or a combined multi-indicator mode. It enters from the selected signals and exits with percentage take-profit and stop-loss

Strategy v6 Oscillators & momentumMoving averages
Updated yesterday · None stated GitHub repository of Simpleton v0.01 KIMI - Enhanced

P-Dipmix Kripto

by gocaman
3 stars

P-Dipmix Kripto is a multi-indicator oscillator and screener designed to detect dip opportunities in cryptocurrency markets. It calculates WaveTrend oscillator lines, Bollinger Bands, the Awesome Oscillator, and the Accelerator Oscillator to evaluate oversold

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated yesterday · None stated GitHub repository of P-Dipmix Kripto

Talons Wyckoff Phase

by muammeryldrm42
1 stars

A strategy that looks for spring and upthrust patterns inside a consolidation range. A spring is a high-volume bar that dips below the recent range low, closes back above it and closes up. An upthrust is the mirrored move above the range high. A range counts a

Strategy v5 Support & resistanceMean reversion
Updated 5 months ago · None stated GitHub repository of Talons Wyckoff Phase
1 stars

A strategy that reads an external oscillator, called the thermometer, through a source input and trades a chosen signal symbol, SPX by default, according to high and low temperature thresholds of 75 and 25. Buy and sell modes include buying high and selling lo

Strategy v6 Oscillators & momentumMean reversion Repaints
Updated 7 months ago · None stated GitHub repository of Thermometer Strategy

Average Price VWAP

by ivansoft
1 stars

An indicator in a separate pane that works on the average of open and close and an anchored volume weighted average price. The VWAP and optional standard deviation bands are drawn on the price chart, with a settable multiplier and anchor period, daily by defau

Indicator v6 VolumeMean reversion
Updated 1 year ago · None stated GitHub repository of Average Price VWAP
6 stars

This indicator classifies price action into four distinct market regimes: Trend, Expansion, Compression, or Mean Reversion. It determines states using a simplified Hurst exponent estimate, ADX slope thresholds, and realized volatility measurements. Based on th

Indicator v6 TrendVolatility & bands
Updated 8 weeks ago · MIT GitHub repository of Capital41 Regime Matrix v3
1 stars

A long-only strategy for crypto spot that builds support zones from pivot lows on a higher timeframe, 15 minutes by default, and watches the chart timeframe for a liquidity sweep below a swing low followed by a reclaim and a higher low. Reclaim confirmation ca

Strategy v6 Mean reversionSMC / ICT / price action
1 stars

Reversal RSI Stochastic ATR is an indicator that prints a reversal label when RSI is beyond its oversold or overbought level and the stochastic K line crosses D inside its own extreme zone. On each signal it draws stop loss and take profit lines at an ATR mult

Indicator v6 Mean reversionOscillators & momentum
Updated 4 months ago · MPL-2.0 GitHub repository of Reversal RSI Stochastic ATR

Commodity Heat Reversal plots score-based mean-reversion reversal markers on the price chart for commodity futures, aimed at the four-hour timeframe. It builds separate long and short heat scores from ATR distance to a mean moving average, ATR expansion, RSI e

Indicator v6 Mean reversionVolatility & bands
Updated 2 days ago · MIT GitHub repository of Commodity Heat Reversal [WavesUnchained]

VWAP Bounce - Eterna

by EternaHybridExchange
9 stars

This strategy overlays volume-weighted average price deviation bands and an exponential moving average trend filter directly on the price chart. It enters long positions during an uptrend when price recovers above the lower band, and enters short positions in

Strategy v5 Mean reversionTrend
Updated 7 months ago · MIT GitHub repository of VWAP Bounce - Eterna
4 stars

This strategy executes mean-reversion trades based on RSI overbought and oversold levels directly on the price chart. It generates long signals when the RSI crosses back above the oversold boundary and short signals when it crosses below the overbought boundar

Strategy v5 Mean reversionOscillators & momentum
Updated 11 months ago · Custom licence GitHub repository of RSI Mean Reversion Strategy [Lab]

Alpy

by avatar-lavventura
2 stars

This strategy overlays a 60-minute Volume Weighted Moving Average with percentage-based upper and lower bands, combined with an RSI oscillator and Williams Fractals. It triggers long entries when price pierces below the lower band and short entries when price

Strategy v4 Moving averagesOscillators & momentum Repaints
Updated 7 months ago · None stated GitHub repository of Alpy

ES Professional Fade

by knectardev
1 stars

ES Professional Fade is an intraday mean-reversion strategy designed for fading opening gaps on ES futures. It identifies market opening gaps using defined percentage and ATR thresholds, then places stop orders to fade the move while utilizing market breadth e

Strategy v5 Mean reversionSessions & time
Updated 9 months ago · None stated GitHub repository of ES Professional Fade
1 stars

A Pine v4 overlay that builds Bollinger Bands from a simple moving average and a multiple of the standard deviation of the chosen source. Inputs set the length, source, deviation multiplier and plot offset. The title suggests reversal use, but the portion of c

Indicator v4 Volatility & bandsMean reversion
Updated 3 years ago · None stated GitHub repository of Bollinger Bands Trend Reversal

Williams %R Reversal - Eterna MCP

by EternaHybridExchange
9 stars

This strategy tracks the Williams %R oscillator to trade mean-reversion bounces from overbought and oversold extremes. It opens long or short positions when a reversal signal occurs alongside confirming price direction, while generating JSON-formatted alert pa

Strategy v5 Oscillators & momentumMean reversion
Updated 7 months ago · MIT GitHub repository of Williams %R Reversal - Eterna MCP
1 stars

An indicator that reads a user-supplied CSV or data file published through Pine Seeds, using column index and delimiter settings, and overlays the external close, high and low on the current chart. Extras include an OLS regression channel, a z-score channel, a

Indicator v5 DivergenceMean reversion
Updated yesterday · None stated GitHub repository of External Data Reader Extended
1 stars

A price-chart indicator by AlgoAlpha that builds reversal bands around a moving basis, with band width set from a percentile of recent price moves. When price reaches a band it marks a bullish or bearish reversal signal and starts an ATR-based trailing stop li

Indicator v6 Mean reversionVolatility & bands
Updated 2 months ago · None stated GitHub repository of Reversal Signals & Trailing Stop
1 stars

This strategy detects bounces from support and resistance levels using swing pivot highs and lows. It waits for the price to touch an identified pivot level within a user-defined percentage tolerance and confirms an entry when a rejection candlestick forms, ch

Strategy v5 Support & resistanceCandlestick patterns
Updated 8 months ago · None stated GitHub repository of Springboard Algo (S/R Bounce)

Bollinger Bands %b

by ivansoft
1 stars

Plots Bollinger Bands %b, which shows where price sits relative to the bands, in a separate pane. Values near one mean price is at the upper band, near zero at the lower band and 0.5 at the middle. Length, source and standard deviation multiplier are adjustabl

Indicator v6 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of Bollinger Bands %b

Bollinger Bands

by zhuzp98
1 stars

A variation on Bollinger Bands drawn on the price chart. It uses a 21-period EMA of the HLC3 price as the basis, with upper and lower bands set by a standard deviation multiplier. It also calculates a band position value and an EMA of band width, shown in the

Indicator v5 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of Bollinger Bands

This mean-reversion strategy plots Bollinger Bands and a long-term moving average directly on the price chart. It enters trades when price candles penetrate the outer Bollinger Bands beyond a user-defined body percentage, anticipating a price reversal. Entries

Strategy v5 Mean reversionVolatility & bands
Updated 2 months ago · None stated GitHub repository of Bollinger Bands Winner PRO [Alorse]

Bollinger Bands Strategy

by TWODS-CAPITAL
37 stars

This strategy executes trades based on price interactions with standard Bollinger Bands plotted on the price chart. It calculates a simple moving average basis line along with upper and lower standard deviation bands. Long entries are triggered when price cros

Strategy v5 Volatility & bandsMean reversion
Updated 3 years ago · MIT GitHub repository of Bollinger Bands Strategy

ES Professional Fade

by knectardev
1 stars

The ES Professional Fade strategy plots entry and exit signals on the price chart for E-mini S&P futures. It fades price action after the opening range closes during regular trading hours. The strategy declares a fixed position size of one contract with $2.01

Strategy v5 Mean reversionSessions & time Repaints
Updated 9 months ago · None stated GitHub repository of ES Professional Fade
1 stars

This overlay indicator simulates a date-bounded Bitcoin dollar-cost average and separate long and short value-averaging books. Inside the start and end dates it adds a fixed USDT amount each bar, converts it at the close into BTC, and updates average price and

Indicator v5 Mean reversion
Updated 1 year ago · None stated GitHub repository of TeeLek Lab 04 Long/Short DCA+VA
37 stars

This strategy plots Bollinger Bands on the price chart using a simple moving average and a multiple of standard deviation. It places a long stop entry when close crosses above the lower band and a short stop entry when close crosses below the upper band. Pendi

Strategy v5 Volatility & bandsMean reversion
Updated 3 years ago · MIT GitHub repository of Bollinger Bands Strategy directed

The Stock and NQ Futures Convergence Strategy identifies trading opportunities by comparing the Relative Strength Index of the active chart stock against NQ futures. It enters a long position when NQ RSI rises above the upper threshold while the stock RSI stay

Strategy v5 Oscillators & momentumDivergence
Updated 2 years ago · GPL-3.0 GitHub repository of Stock and NQ Futures Convergence Strategy
1 stars

This overlay strategy combines an AlphaTrend core with kinematic, Bayesian, and mean-reversion models, plus harmonic, classical, and candlestick pattern engines. It plots consolidation zones, volume-profile points of control, pattern lines, and forward forecas

Strategy v5 TrendCandlestick patterns Repaints
Updated yesterday · None stated GitHub repository of JAT+BSM Pro Extended

Scalping BB CCI ROC

by rubbermetal
1 stars

Scalping BB CCI ROC is an indicator that marks Scalp L or Scalp S labels when the close is outside a Bollinger Band while CCI and rate of change are both beyond their thresholds in the same direction. It draws the bands with a fill colored by price position, a

Indicator v6 ScalpingMean reversion
Updated 4 months ago · MPL-2.0 GitHub repository of Scalping BB CCI ROC

ES Professional Fade

by knectardev
1 stars

This strategy executes gap-fade trades on E-mini S&P 500 futures during Regular Trading Hours. It compares the current market open with the prior session close to identify opening gaps, qualifying entries using minimum gap percentages, index point minimums, an

Strategy v5 Mean reversionSessions & time
Updated 9 months ago · None stated GitHub repository of ES Professional Fade
330 stars

The EMA Moving Away Strategy calculates an Exponential Moving Average (EMA) to identify mean-reversion trade opportunities when price stretches significantly away from the line. A long entry triggers when the close drops below the EMA by a specified percentage

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of EMA Moving away Strategy [Alorse]

This intraday strategy fades tests of the previous day high and low during the New York morning session. It identifies mean-reversion opportunities when price touches within a few ticks of the prior day high or low, closes back inside, confirms with above-aver

Strategy v6 Mean reversionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TeleNexus Sovereign PDH/PDL Fade V6

ABCD Strategy

by hasnocool
106 stars

Identifies harmonic ABCD chart patterns using pivot highs and pivot lows over a configurable lookback length. The strategy evaluates price retracement and extension ratios across four consecutive alternating pivot points to trigger long or short positions. It

Strategy v5 Support & resistanceMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of ABCD Strategy

RSI Swing Signal

by Web3Degenerate
2 stars

This indicator plots an RSI oscillator in a separate pane and marks long and short setups when RSI is oversold or overbought and a swing low or swing high fractal forms with a reversing candle. It sizes a stop from the recent extreme plus an ATR multiple, then

Indicator v5 Oscillators & momentumCandlestick patterns
Updated 2 years ago · None stated GitHub repository of RSI Swing Signal

A strategy that first classifies the market using ADX and a Bollinger-inside-Keltner squeeze check, then switches between two sub-strategies. In ranging conditions it fades asymmetric Bollinger Band extremes with a 200 EMA trend filter. In trending conditions

Strategy v6 Mean reversionBreakout
Updated 7 days ago · GPL-3.0 GitHub repository of Hierarchical HTS v6 Markov-Proxy Regime Switcher

Volume Spike Reversal

by Basant1Saini
1 stars

The Volume Spike Reversal strategy identifies potential price reversals driven by high volume activity. It triggers long entries when a volume spike occurs while price is below a 20-period simple moving average, combined with oversold RSI readings and bullish

Strategy v5 VolumeOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Volume Spike Reversal

More Pine Script Categories

Browse the whole Pine Library

Third-party code. ForexR lists open-source Pine scripts from GitHub; it did not write, test or endorse them, and their summaries are generated automatically from each script's code and README. Indicators describe the past, and a strategy's backtest can look better than live trading. Check a script on a demo account before you rely on it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

Learn to Use Pine Scripts

Free, plain-English guides: add a script to TradingView, read what it does, test it and avoid the common traps.

  1. 1Using this librarySearch, filters, licences and what the badges mean.
  2. 2Add a script to TradingViewCopy, paste into the Pine Editor, save and add to chart.
  3. 3Indicators, strategies and librariesWhat each type does and how to tell them apart.
  4. 4Spot a script that repaintsWhy some signals change after the bar closes.
  5. 5Backtest a strategyStrategy Tester settings that keep results honest.
  6. 6Send alerts to MT4 or MT5From a TradingView alert to an order in MetaTrader.
  7. 7What Pine Script isThe language, what it can and cannot do, and where to start.
  8. 8Write your first indicatorA complete script, line by line, in the Pine Editor.
  9. 9Read a script before you trust itA routine for checking inputs, logic and red flags.
  10. 10Edit a script safelyChange colours and lengths, add a filter or an alert.
  11. 11Pine Script alertsalertcondition(), alert(), placeholders and webhooks.
  12. 12Build a crossover strategyAn EMA cross strategy with an ATR stop, ready to test.

Trade Your Charts With a Regulated Broker

Compare regulated brokers on platforms, spreads, minimum deposit and leverage.

Compare brokers