Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 43)

Open-source Pine Script strategies: scripts that place simulated trades, so TradingView's Strategy Tester can report how the rules did on past data.

Pine scripts3,040
Code shown here1,833open licence
Updated in a year1,781
No repaint flag2,645

Strategies: All

5 stars

This strategy executes short trades based on a confluence of three indicators: Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), and Bollinger Bands standard deviation metrics. It enters short positions when a bearish bar coincides w

Strategy v4 Oscillators & momentumVolatility & bands
Updated 3 years ago · Apache-2.0 GitHub repository of RSI + MACD + BB Short Strategy

RSI Mean Reversion

by trugurpala
4 stars

The strategy identifies mean reversion opportunities using the RSI indicator. It calculates RSI with customizable length and generates long entries on RSI crossover above the oversold level and short entries on crossover below the overbought level. Entries are

Strategy v6 Mean reversionOscillators & momentum
Updated 2 months ago · MIT GitHub repository of RSI Mean Reversion

SAIYAN OCC Strategy R5.41

by IAMATOMIC001
3 stars

SAIYAN OCC Strategy is a price-chart strategy that builds a short moving average of open and close prices using TEMA, Hull, or ALMA and colours bars by trend. It can take long, short, or both directions, optionally from Heikin Ashi closes or a multiplied alter

Strategy v5 TrendMoving averages Repaints
Updated 12 months ago · None stated GitHub repository of SAIYAN OCC Strategy R5.41

Uabmeacd

by avatar-lavventura
2 stars

This strategy plots a WaveTrend oscillator and a squeeze-momentum histogram in a separate pane. It builds WaveTrend from a typical-price EMA channel, marks overbought and oversold bands, and flags WaveTrend crosses. Bollinger Bands and Keltner Channels detect

Strategy v4 Oscillators & momentumVolatility & bands
Updated 7 months ago · None stated GitHub repository of Uabmeacd

Poi-Scalp v2

by majixai
1 stars

A strategy that scores market conditions with many weighted components: head and shoulders and double top or bottom pivots, a regression channel with an R-squared filter, polynomial slope, a cosh-based term, skew, divergence, volume flow, VWAP and an ADX plus

Strategy v5 ScalpingSupport & resistance
Updated 2 days ago · None stated GitHub repository of Poi-Scalp v2

Matrix Eigen PCA

by pineforge-4pass
1 stars

This strategy computes a 2x2 covariance matrix from short-term differences in close-open and high-low ranges. It extracts the largest eigenvalue of the matrix as a volatility measure and compares it to its own simple moving average. When the largest eigenvalue

Strategy v6 Volatility & bandsOscillators & momentum
Updated 7 days ago · Apache-2.0 GitHub repository of Matrix Eigen PCA
1 stars

A swing strategy that goes long when the SuperTrend (period 10, multiplier 5) is bullish, price is above a rising 200-period EMA, and the long side is enabled. Shorts follow the mirror rules but are switched off by default. An optional partial exit closes a se

Strategy v6 TrendMoving averages
Updated 8 days ago · GPL-3.0 GitHub repository of Pro-Swing System: 200 EMA and SuperTrend
1 stars

This multi-factor consensus strategy aggregates directional votes across five independent analytical agents: dual EMA trend alignment (50/200), RSI momentum, Bollinger Bands baseline position, intraday VWAP, and higher-timeframe daily EMA 50 trend. It executes

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of TN Federated Swarm Voting v6

MACD Test VWAP

by tseitz
1 stars

This strategy combines standard Moving Average Convergence Divergence (MACD) crossovers with Volume Weighted Average Price (VWAP) level interactions. It enters long positions when the MACD line sits above its signal line and short positions when below. Positio

Strategy v4 TrendOscillators & momentum Repaints
Updated 4 years ago · None stated GitHub repository of MACD Test VWAP
257 stars

This overlay strategy marks short-term turning points on the price chart and enters SPY option-style trades from them. It plots simple moving averages of highs and lows, draws up and down reversal arrows, and colors bars when a short-term extreme coincides wit

Strategy v5 TrendMoving averages Repaints
Updated 7 weeks ago · None stated GitHub repository of SPY Options Trading - Alert

Quick Flip Scalper

by TradersPost
228 stars

This strategy executes an opening-range liquidity fade based on the first candle of a session. It qualifies the opening range against the daily ATR to confirm manipulation or liquidity spikes. If qualified, it searches for reversal candlestick patterns, such a

Strategy v6 Sessions & timeCandlestick patterns
Updated 3 months ago · None stated GitHub repository of Quick Flip Scalper

Archens Shares

by hasnocool
106 stars

Archens Shares is an intraday breakout strategy designed for session-based trading. It tracks the highest high and lowest low from a 30-minute timeframe during a specified session window, defaulting to 09:45 to 10:15. A long position is entered when the closin

Strategy v5 BreakoutSessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of Archens Shares

This strategy implements a Donchian breakout trend-following system with volatility-adaptive profit targets. It enters long or short on 55-period Donchian channel breakouts, sizes positions by ATR risk, and pyramids up to four units as price advances. Stop los

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 43: Volatility Adaptive

FilledValueGap E002

by ruckard
13 stars

FilledValueGap E002 is a trading strategy that enters positions opposite to the direction of a filled value gap, operating on the premise that the prevailing trend will resume after gap completion. It utilizes Curie closing moving averages as trend filters to

Strategy v5 SMC / ICT / price actionTrend
Updated 1 year ago · None stated GitHub repository of FilledValueGap E002

VWMA

by avatar-lavventura
2 stars

This script calculates a Volume Weighted Moving Average with length 24 using high low close and volume data then plots it directly on the price chart. The VWMA line appears in blue. It also draws an upper band in red and a lower band in green whose distances f

Strategy v4 Moving averages Repaints
Updated 7 months ago · None stated GitHub repository of VWMA

NASDAQ 100 Peak Hours Strategy

by wynnforthework
2 stars

This Pine Script strategy trades the NASDAQ 100 index during peak hours using EMA crossovers, RSI, and VWAP filters. Long entries occur when close exceeds the 9-period EMA which is above the 21-period EMA, with RSI above 50, price above VWAP, EMAs aligned, and

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of NASDAQ 100 Peak Hours Strategy

CHOCH + BOS Strategy

by skipp-dev
1 stars

This strategy identifies market structure shifts, specifically Change of Character (ChoCH) and Break of Structure (BOS), on the main price chart. It triggers entries based on swing pivot breakouts with an optional volume filter and moving average confirmation.

Strategy v6 SMC / ICT / price actionTrend
Updated 4 days ago · None stated GitHub repository of CHOCH + BOS Strategy

Mean Reversion Bollinger

by pineforge-4pass
1 stars

This strategy combines Bollinger Bands and the Relative Strength Index (RSI) to execute mean-reversion trades directly on the main price chart. It opens long positions when price drops below the lower band with an oversold RSI reading, and opens short position

Strategy v6 Oscillators & momentumVolatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of Mean Reversion Bollinger
1 stars

A Pine v4 strategy that plots a 21-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of MLNBTC EMA Cross Strategy
330 stars

A momentum strategy combining the TTM Squeeze oscillator with an RSI filter. It calculates linear regression momentum relative to Bollinger Bands and Keltner Channels alongside an RSI oscillator. Long signals trigger when momentum rises from below zero while R

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of TTM Squeeze [Alorse]

This strategy plots volume-weighted moving average volatility bands and standard deviation levels calculated from multi-timeframe price data directly on the price chart. It defines percentage-based stop-loss and take-profit exit targets for both long and short

Strategy v5 Moving averagesVolatility & bands Repaints
Updated 7 weeks ago · None stated GitHub repository of V1.4 ESU2023 - Futures 1M No Repaint

Astor SMA20/60

by hasnocool
106 stars

This strategy plots SMA20 and SMA60 on the price chart for BTCUSDT. It generates long entries on close crossing above SMA20 and short entries on crossing below. Separate signals trigger on SMA60 crossovers. Backtest starts at user-defined year, month, and day

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Astor SMA20/60
16 stars

Seykota Alt 44: ADX Pyramid is a trend-following strategy that plots on the price chart. It enters positions on Donchian Channel breakouts when the Average Directional Index (ADX) confirms a strong trend. Position sizing uses Average True Range (ATR) risk, wit

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 44: ADX Pyramid

FilledValueGap F002

by ruckard
13 stars

FilledValueGap F002 is a trading strategy that enters trades when a recent price gap is filled, operating under the assumption that price action will continue in the direction of the underlying trend. It plots Curie closing moving average lines directly on the

Strategy v5 SMC / ICT / price actionMoving averages
Updated 1 year ago · None stated GitHub repository of FilledValueGap F002

This strategy opens long trades when RSI stays above its midline, the slow stochastic is oversold and its K line crosses above D, and MACD crosses its signal line, all within a configurable delay. It draws on the price chart. A long exits when RSI and the stoc

Strategy v4 Oscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of RSI + Slow Stochastic + MACD Long Strategy (Daily)

VWMA 1hr

by avatar-lavventura
2 stars

This strategy overlays a 1-hour 24-period volume-weighted moving average (VWMA) and calculates multi-bar Williams Fractals on the price chart. It is restricted to a customizable backtest date window. The strategy calculates on every tick and allows extensive p

Strategy v4 Moving averagesSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of VWMA 1hr

NY

by wynnforthework
2 stars

This strategy combines a fast Hull Moving Average with Bollinger Bands to generate mean-reversion signals. It opens a long position when the calculated Hull Moving Average crosses above the lower Bollinger Band, and opens a short position when it crosses below

Strategy v5 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of NY

Median Crossover

by pineforge-4pass
1 stars

This strategy plots a rolling median and an exponential moving average of close on the price chart and enters when the two cross. A median cross above the EMA opens a long; a cross below opens a short, reversing the prior position with a fixed quantity of one.

Strategy v6 Moving averagesTrend Repaints
Updated 7 days ago · Apache-2.0 GitHub repository of Median Crossover

A strategy that trades liquidity sweeps within a trend context. Trend comes from EMAs, ADX with DI alignment and an optional confirmed higher-timeframe EMA filter, with optional ROC and balance-of-power agreement. A swing level is swept and reclaimed by a cand

Strategy v6 SMC / ICT / price actionVolume Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Ranger V2 POC State Delta Session Profiles
1 stars

A strategy that implements the Parabolic SAR calculation in code, with start, increment and maximum acceleration settings. It plots the current and next bar SAR values as crosses on the price chart. On each confirmed bar it places a stop order at the next SAR

Strategy v6 Trend
Updated 1 year ago · None stated GitHub repository of Parabolic SAR Strategy
1 stars

A Pine v4 strategy that plots a 21-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of OMGBTC EMA Cross Strategy
330 stars

2 EMA/SMA + RSI Strategy [Alorse] combines three configurable moving averages with a short-period Relative Strength Index filter. It plots fast, slow, and trend moving averages on the price chart. Long entries trigger when the fast moving average is above the

Strategy v4 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of 2 EMA/SMA + RSI Strategy [Alorse]
257 stars

Williams Strategy - Alert is a Pine Script v5 strategy that plots three-bar simple moving averages of high and low prices directly on the price chart. It detects upward and downward trend reversals by comparing the current bar's low and high with those from th

Strategy v5 TrendMoving averages
Updated 7 weeks ago · None stated GitHub repository of Williams Strategy - Alert
114 stars

This strategy plots a base Jurik moving average and the average of three longer Jurik averages on the price chart. Long and short signals come from crossovers of those lines, or, when pivoting is enabled, from the averaged line stopping a fall or a rise over a

Strategy v4 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of 4 JMA Crossover Strategy

Astor SMA20/60 TW

by hasnocool
106 stars

This strategy calculates 20-period and 60-period simple moving averages (SMAs) plotted directly on the price chart. It executes long entries when the closing price crosses above either SMA, provided the bar is on or after the configured backtest start date. Po

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Astor SMA20/60 TW
16 stars

This strategy enters long or short when price breaks a Donchian channel and RSI confirms the same direction. It sizes each unit from a risk percent of equity and can add units after a set ATR advance, up to a unit limit. An initial ATR stop and a trailing stop

Strategy v6 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of Seykota Alt 45: Dual Momentum

This short-only trading strategy combines the Relative Strength Index (RSI), Slow Stochastic, and MACD to identify bearish setup entries. A short position triggers when the RSI drops below 50, the Slow Stochastic crosses down while overbought, and the MACD lin

Strategy v4 Oscillators & momentumTrend
Updated 3 years ago · Apache-2.0 GitHub repository of RSI + Slow Stochastic + MACD Short Strategy

Momentum ROC Combo

by pineforge-4pass
1 stars

A strategy that combines the Momentum and Rate of Change indicators, shown in a separate pane with a zero line. It enters long when momentum crosses above zero while rate of change is positive, and short when momentum crosses below zero while rate of change is

Strategy v6 Oscillators & momentum
Updated 7 days ago · Apache-2.0 GitHub repository of Momentum ROC Combo
1 stars

A strategy that trades liquidity sweeps confirmed by order flow. It takes the highest high and lowest low of a prior window of 10, 20 or 50 bars, depending on a rigor setting. A bullish sweep is a low below the prior low that closes back above it with positive

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TN Footprint Liquidity Sweep
1 stars

A Pine v4 strategy that plots a 23-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of REPBTC EMA Cross Strategy

Flawless Victory Strategy is a mean-reversion overlay that combines Bollinger Bands, RSI, and Money Flow Index (MFI) to identify trade entries and exits. The script provides three preset configuration modes: Version 1 executes signals without target exits, whi

Strategy v4 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Flawless Victory Strategy [Alorse]
106 stars

Calculates a momentum squeeze using Bollinger Bands and Keltner Channels alongside a trend-filtering moving average. It generates long and short entries based on squeeze momentum bar conditions and an optional pre-squeeze dot count filter. Exits can trigger on

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Athena Momentum Squeeze - Autoview
16 stars

This strategy implements a Donchian breakout trend-following system with sector-adaptive profit targets and ATR-based volatility sizing. It enters positions on Donchian channel breakouts, pyramiding additional units at ATR increments up to a configurable maxim

Strategy v6 BreakoutTrend
Updated 12 months ago · None stated GitHub repository of Seykota Alt 46: Sector Adaptive

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