Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 25)

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

RSI Threshold

by latentwill
4 stars

This strategy calculates the Relative Strength Index of the close and is configured for a separate pane. It opens a long position when RSI is below the oversold level and a short position when RSI is above the overbought level. Position size defaults to ten pe

Strategy v5 Oscillators & momentumMean reversion
Updated 8 days ago · None stated GitHub repository of RSI Threshold
4 stars

This strategy overlays directly on the price chart to identify pullback buying opportunities during established bullish moves. It checks whether price gained by a specified percentage over an earlier window and subsequently pulled back by a minimum threshold o

Strategy v5 TrendMean reversion
Updated 5 months ago · None stated GitHub repository of Buy the Dip in an Uptrend

订单流分析

by YooooungLee
4 stars

This strategy evaluates order flow by combining volume dynamics and price deviation relative to the Volume Weighted Average Price (VWAP). It enters long trades when trading volume exceeds a relative threshold, price moves significantly above VWAP, net volume p

Strategy v6 VolumeOscillators & momentum Repaints
Updated 10 months ago · Apache-2.0 GitHub repository of 订单流分析

UT Bot Alerts

by ShabbirHasan1
4 stars

UT Bot Alerts combines an ATR-based trailing stop mechanism with selectable channel bands, including Bollinger Bands, Keltner Channels, and standard or pivot-based Donchian Channels. Signals are driven by crossovers between price and the adaptive ATR trailing

Strategy v4 TrendVolatility & bands
Updated 1 year ago · Custom licence GitHub repository of UT Bot Alerts

DX Strat

by jawauntb
3 stars

DX Strat is an intraday directional trading strategy that combines a composite RSI momentum calculation, moving averages, Keltner Channels, and VWAP to execute trades. It initiates long positions when composite momentum RSI crosses above 77 and short positions

Strategy v5 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of DX Strat

TQQQ ORB v1

by yalili8521
2 stars

Calculates the opening range during the initial minutes of regular trading hours and triggers breakout trades directly on the price chart. Long positions enter when price closes above the opening range high, while short entries trigger on closes below the open

Strategy v6 BreakoutSessions & time
Updated 9 days ago · None stated GitHub repository of TQQQ ORB v1

SUSHI 2H ZEGUELA DEMABOT

by danielvm-git
2 stars

This overlay strategy plots up to three double exponential moving averages of a chosen source on the price chart. With the default lengths, it treats a crossover of the first and second DEMA as a long signal and a crossunder as a short signal; a third DEMA can

Strategy v4 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of SUSHI 2H ZEGUELA DEMABOT

Lakshmi Strategy v2

by voletiramu
2 stars

The Lakshmi Strategy v2 automatically computes daily price zones from previous candle bodies using body width and wick factors then overlays them on the chart. It generates long signals when VPA close positions confirm at zone levels with fallback stop losses

Strategy v6 TrendSupport & resistance
Updated 6 months ago · None stated GitHub repository of Lakshmi Strategy v2

This strategy generates long entry signals by combining a Donchian Channel breakout with a moving average trend filter, volume confirmation, and a macro volatility regime gate based on CBOE VIX and VIX3M ratios. It enters long positions when prices break above

Strategy v5 TrendBreakout
Updated 10 months ago · MIT GitHub repository of Trend-Breakout System mit VIX Heatmap Gate

FRAMA & CPMA Strategy [CSM]

by wynnforthework
2 stars

The FRAMA & CPMA Strategy overlay script combines a Fractal Adaptive Moving Average (FRAMA) and a custom CPMA indicator imported from an external library. It generates long and short trading signals when price crosses above or below either moving average line.

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of FRAMA & CPMA Strategy [CSM]

Order strgy SA SOT

by DaniilOkrug
2 stars

This strategy identifies SA signals for long entries and SOT signals for short entries. It places pending orders with stop loss and take profit. The take profit distance equals tp_count multiplied by the distance from entry to stop loss. The difference input s

Strategy v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 4 years ago · MIT GitHub repository of Order strgy SA SOT

Swing 4h Majors

by nvolpe2007-cell
1 stars

A long-only strategy for large crypto pairs on 4-hour bars, forced to 4-hour data by default. An entry needs price above a 50-bar EMA with the 20-bar EMA above it, rate of change above a minimum, RSI crossing up through 50 but below an overbought limit, and an

Strategy v6 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Swing 4h Majors

Chandelier Exit

by pineforge-4pass
1 stars

This strategy calculates Chandelier Exit trailing bands using average true range (ATR) and highest high / lowest low lookback levels. It maintains a stateful direction variable that flips bullish when the close crosses above the short band level or bearish whe

Strategy v6 TrendVolatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of Chandelier Exit
1 stars

A long-only strategy that buys when the MACD line crosses above zero and closes the position when it crosses back below zero. MACD fast, slow and signal lengths and the price source are adjustable. It invests the full equity per trade, includes a commission se

Strategy v6 Oscillators & momentumTrend
Updated 8 days ago · None stated GitHub repository of MACD Zero-Line Strategy Long Only
1 stars

A strategy that uses a Hull-smoothed volatility band trend engine to set direction, then enters only on a pullback into the trailing trend level followed by a reclaim candle. Settings cover minimum bars since the flip, pullback tolerance in ATR, lookback and m

Strategy v6 TrendVolatility & bands Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Adaptive Trend Pullback Continuation v1
1 stars

A long-only crypto spot strategy that builds support and resistance zones from pivots on 5-minute, 15-minute, 1-hour and 4-hour charts and enters after price retests a support zone, within a set number of bars. Touch zones are sized by ATR or ticks, and a mini

Strategy v6 Support & resistanceTrend
Updated 13 days ago · None stated GitHub repository of SR Trend Final - Support Retest + MA R:R
1 stars

A strategy that trades a 9 and 21 EMA crossover only in the direction of a higher-timeframe trend. The higher timeframe, daily by default, supplies an EMA and prior close from the previous completed bar, and a long needs the close above that EMA while a short

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of MTF Trend Sovereign Strategy

Manchu Strategy

by GreyssonEnterprises
1 stars

A Pine v5 strategy that shades a trading session window on the chart, defaulting to a morning session in the Chicago time zone with weekday toggles. Inputs show an RSI of length 40, a short channel length, a risk-to-reward ratio, fixed dollar risk, leverage an

Strategy v5 Sessions & timeOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Manchu Strategy
1 stars

This strategy combines VWAP bands with a multi-factor momentum scoring system to trade trend continuations. It enters positions during pullbacks or breakouts around VWAP when momentum criteria—derived from EMAs, ROC, RSI, MACD, and ADX—reach user-defined thres

Strategy v6 TrendOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Fusion VWAP Momentum Strategy
1 stars

This price-chart strategy builds a prior-day floor pivot from yesterday’s high, low, and close, plus the related resistance and support levels. It looks for a break above that pivot when the prior close was within a set percentage below it, and can require pri

Strategy v6 Support & resistanceBreakout
Updated 4 months ago · None stated GitHub repository of Pivot Breakout (NON-REPAINT)

XAUUSD-Asia Reversion Strategy

by riegodavid-git
1 stars

A gold strategy built on fractal sweeps, fair value gaps and a short-period RSI. It fades extended moves, using RSI overbought and oversold gates and an overextension timer, and places limit orders that cancel after a set number of bars. The stop is ATR-based

Strategy v6 Mean reversionSMC / ICT / price action
Updated 4 months ago · None stated GitHub repository of XAUUSD-Asia Reversion Strategy
1 stars

This strategy executes long trades based on directional candle signals fetched from a custom secondary timeframe. It evaluates bullish or bearish candle alignment on the requested timeframe and enters a long position when the state turns bullish. Position sizi

Strategy v6 Trend
Updated 4 months ago · MIT GitHub repository of MTF LTF Position State

Talons Liquidity Grab + BOS

by muammeryldrm42
1 stars

A strategy that combines a liquidity grab with a break of structure. It tracks the latest pivot high and low, then enters long when the previous bar swept below the swing low and closed back above it and the current close breaks the swing high. Shorts mirror t

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of Talons Liquidity Grab + BOS

Energy Block V13

by shawnwong84
1 stars

A box breakout strategy whose header comments describe a focus on cutting losing trades. It uses a wider ATR stop, an extra early exit when floating loss exceeds a multiple of the box height, a strict EMA 50 trend filter, a volume filter and a trailing profit

Strategy v6 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Energy Block V13
1 stars

This Bitcoin trading strategy analyzes golden cycle phases using halving dates and custom lengths for pre- and post-halving rises and drops. It plots a rainbow ribbon, supply and demand zones, Ichimoku cloud, geometric mean indicator, and ZigZag lines on the p

Strategy v6 TrendSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle v5
1 stars

ORB - Opening Range Breakout calculates the highest high and lowest low during a configurable opening session and trades breakouts during the subsequent trading session. When the closing price crosses above the opening range high, it enters a long position; cr

Strategy v5 BreakoutSessions & time
Updated 8 months ago · None stated GitHub repository of ORB - Opening Range Breakout
1 stars

A strategy based on the Open Close Cross idea, where a moving average of the open is compared with one of the close. It offers twelve moving average types, an optional alternate higher-timeframe resolution, a delay offset to limit repainting, and long, short o

Strategy v6 Moving averagesTrend Repaints
Updated 9 months ago · None stated GitHub repository of OCC Strategy Optimized
1 stars

This strategy records the high and low during a configurable opening session, defaulting to 09:30–10:00 exchange time, then locks the range when the session ends. It enters long when price closes above the range high and short when price closes below the range

Strategy v5 BreakoutSessions & time
Updated 11 months ago · None stated GitHub repository of Open Range Breakout Strategy

RSI Divergence Pro

by feliperazeek
1 stars

This strategy detects regular and hidden RSI divergences from pivot points on a 9-period RSI and trades them with labelled markers and stop lines on the price chart. Only long entries on bullish divergences are enabled by default, and shorts can be switched on

Strategy v5 DivergenceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of RSI Divergence Pro

EZ Algo Trader (Beta)

by turnupdigital
1 stars

A strategy on the price chart that combines several external signal sources into entries, using inputs that read other indicators. Each of up to five signals has a name, long and short source and a usage mode. Positions are sized in contracts, with a maximum t

Strategy v6 Screeners & dashboards Repaints
Updated 1 year ago · None stated GitHub repository of EZ Algo Trader (Beta)

Lab-Doi-06

by theteelek
1 stars

Lab-Doi-06 is a price-chart strategy that limits activity to a user-set start and end time. The visible code defines a Hull moving average helper, dashed vertical lines at chosen times, and a seven-day long buy interval described as dollar-cost averaging. It t

Strategy v6 Moving averages
Updated 1 year ago · None stated GitHub repository of Lab-Doi-06

RSI Strategy

by Studentcodee
1 stars

A Pine v6 strategy that trades RSI threshold crosses and draws on the price chart. It computes RSI on the close over a length setting. A long entry fires when RSI crosses up through the oversold level, and a short entry fires when RSI crosses down through the

Strategy v6 Oscillators & momentumMean reversion
Updated 1 year ago · None stated GitHub repository of RSI Strategy

Scalping for S50

by lumduan
1 stars

This strategy plots three EMAs (fast length 8, mid 21, slow 55) on the price chart to identify trend direction. It signals long entries in aligned bull trends confirmed by RSI above 50 and bullish MACD during trading hours, entering when price rises above the

Strategy v6 ScalpingTrend
Updated 1 year ago · None stated GitHub repository of Scalping for S50

TOTAL MTPI STRAT M_K

by Mikelkulla
1 stars

This strategy overlays the price chart to determine macro market direction by aggregating signals from an ensemble of up to 26 trend, momentum, and moving-average indicators. It incorporates an Augmented Dickey-Fuller (ADF) market regime filter to detect rangi

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TOTAL MTPI STRAT M_K
1 stars

This strategy looks for a simplified RSI divergence pattern. A long signal needs RSI two bars ago below the oversold level, RSI rising on the next bar and price lower; a short signal mirrors this at the overbought level. Each entry has an ATR-based stop loss a

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of RSI Divergence Strategy
1 stars

A strategy file on the price chart that detects pivot highs and pivot lows over a settable fractal length, marks them with triangles and debug labels, and plots the highest and lowest prices over the same length as step lines. It also rounds highs and lows to

Strategy v6 Support & resistance Repaints
Updated 1 year ago · None stated GitHub repository of PriceStep Pivot Strategy
1 stars

This strategy enters long and short trades when MACD histogram state agrees with KDJ filters. Longs need a positive histogram, MACD below zero, and K, D, and J below 30. Shorts need a negative histogram, MACD above zero, and those values above 70. It closes lo

Strategy v5 Oscillators & momentumMean reversion
Updated 1 year ago · None stated GitHub repository of MACD-KDJ Double Cross Strategy

algo-trade-v11

by akash-yellgetti
1 stars

A strategy-type script for the price chart that draws the high, low and midpoint of the first part of each session, set by end hour and minute inputs. It plots pivot-based support and resistance using fifteen left and right bars, labels breaks that coincide wi

Strategy v5 Sessions & timeSupport & resistance
Updated 2 years ago · None stated GitHub repository of algo-trade-v11
1 stars

A course example strategy with a setting that selects one of three entry rules. The RSI option buys when RSI crosses up through 30 and sells when it crosses down through 70. The MACD option needs a histogram sign and a line cross. The Bollinger option buys bel

Strategy v4 Oscillators & momentumMean reversion
Updated 2 years ago · None stated GitHub repository of My Script Strategy Selector
1 stars

This strategy enters long when a 14-period RSI crosses above 60 and short when it crosses below 40, but only while ADX is under 20. Each trade carries a fixed point-distance stop loss of 75 and take profit of 150 from the average entry price, giving a one to t

Strategy v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of Swing Trading Strategy With 1:2 RR

RSI Strategy

by juliencrn
1 stars

RSI Strategy is a short Pine v5 strategy built on one RSI line with a long default length of 75. It enters long when RSI crosses above the overbought input and short when RSI crosses below the oversold input, so it follows momentum rather than fading extremes.

Strategy v5 Oscillators & momentum Archived
Updated 4 years ago · None stated GitHub repository of RSI Strategy

CRV BTC Binance 2m

by tseitz
1 stars

A Pine v4 strategy that plots a session VWAP with an upper and lower band offset by a percentage of the high and low. It opens a long when a green candle opens above the upper band and a short when a red candle opens below the lower band, closing when the oppo

Strategy v4 VolumeScalping
Updated 4 years ago · None stated GitHub repository of CRV BTC Binance 2m
257 stars

This strategy overlays the price chart and builds Ichimoku-style Tenkan, Kijun, Chikou, and Senkou values from a ten-bar average of opens. It plots pivot highs and lows as resistance and support circles and reconstructs Heikin-Ashi-like prices from recent open

Strategy v5 TrendSupport & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of Dev - Futures No repaint

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