Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 39)

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

Momentum Breakout

by knectardev
1 stars

This strategy enters long when the close is above the upper Bollinger Band and volume exceeds a moving average multiplied by a threshold, and enters short when the close is below the lower band with the same volume condition. New entries occur only while the p

Strategy v5 Volatility & bandsVolume
Updated 9 months ago · None stated GitHub repository of Momentum Breakout
1 stars

A Pine v4 strategy that plots a 36-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 LTCBTC EMA Cross Strategy
330 stars

This strategy generates crossover signals using two exponential moving averages calculated from multi-timeframe Heikin Ashi data. It enters long when the fast EMA crosses above the slow EMA and enters short on a crossunder, reversing the open position. Positio

Strategy v5 Moving averagesTrend Repaints
Updated 2 months ago · None stated GitHub repository of Javo v1 [Repaint] [Alorse]

MACD Strategy

by TradersPost
228 stars

This overlay strategy is built around MACD inputs for a fast average, a slow average, and a signal line. Comments say the script keeps MACD values available and can draw a histogram and zero line in a separate pane, with an optional overlay on price. Settings

Strategy v6 Oscillators & momentumMoving averages
Updated 3 months ago · None stated GitHub repository of MACD Strategy
106 stars

This script executes long and short trades directly on the price chart by combining signals from multiple indicators, including MACD, RSI, Stochastic RSI, Supertrend, and moving average crosses. It aggregates indicator conditions using weighted scores and ente

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Acrypto - Weighted Strategy

This strategy calculates a 20-period Relative Strength Index and plots the oscillator alongside a centerline at 50 in a separate pane. It enters long positions when the indicator crosses above 50 and enters short positions on downward crosses. The strategy rev

Strategy v5 Oscillators & momentum
Updated 6 days ago · GPL-3.0 GitHub repository of Strategy with selective alert() calls

ChannelBreakOutStrategy

by TWODS-CAPITAL
37 stars

This strategy tracks price channels by calculating the highest high and lowest low over a customizable lookback period. It executes stop orders to enter long positions above the upper channel boundary and short positions below the lower channel boundary. Posit

Strategy v5 BreakoutTrend
Updated 3 years ago · MIT GitHub repository of ChannelBreakOutStrategy

This strategy trades Donchian channel breakouts with ATR-based risk. It allows long and short entries, sizes the first unit from a risk percent, and adds up to four fractional units as price moves in favor. An initial ATR stop moves to breakeven after a set pr

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 31: Fractional + BE Lock

Diverlong E002

by ruckard
13 stars

Diverlong E002 is a trading strategy that identifies momentum divergences using state changes in the Squeeze Momentum Indicator. It triggers long and short entries when price action diverges from momentum transition phases. Position exits are determined by Cur

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Diverlong E002
4 stars

This strategy tracks gold price trends using three exponential moving averages with lengths of 8, 21 and 55. It calculates ADX for trend strength filter and ATR for dynamic risk levels. The script enters long positions when the EMAs align bullishly with suffic

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Gold Triple EMA [trugurpala]

Estimations-10min

by IAMATOMIC001
3 stars

This overlay strategy estimates trend with a selectable TEMA, Hull, or ALMA basis and optional higher-timeframe or Heikin Ashi sources. It plots a regression estimator with ATR near and far boundaries, can color bars by trend, and can show order blocks. Entrie

Strategy v5 TrendMoving averages Repaints
Updated 12 months ago · None stated GitHub repository of Estimations-10min

Alpy Vix

by avatar-lavventura
2 stars

Alpy Vix is a strategy that calculates and plots the Williams Vix Fix indicator adapted for BIST stocks in a separate pane. It generates entry signals when the Vix Fix crosses upper bands or percentile ranges and meets filtered criteria based on price action s

Strategy v4 Volatility & bandsOscillators & momentum Repaints
Updated 7 months ago · None stated GitHub repository of Alpy Vix

[SMT] B&S Renko

by wynnforthework
2 stars

This strategy plots Renko open prices on the price chart based on the ATR length setting. It generates buy signals when Renko open crosses under close and sell signals when open crosses over close. The main setting adjusts ATR length used for Renko brick calcu

Strategy v5 TrendScalping
Updated 1 year ago · None stated GitHub repository of [SMT] B&S Renko
1 stars

A strategy that builds on the JAT+BSM family: an AlphaTrend style core with MACD, three consolidation layers with volume profile, candlestick and macro pattern drawings, and a kinematic and Bayesian forecast with a feedback learning rate. Inputs include a stra

Strategy v5 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of JAT+BSM Pro v15 Unified

Highest Lowest Breakout

by pineforge-4pass
1 stars

A channel breakout strategy using the highest high and lowest low over an adjustable lookback. It enters long when the current bar sets a new high and price is above a 50-period EMA, and short when it sets a new low below that EMA. Positions close when price c

Strategy v6 BreakoutSupport & resistance
Updated 7 days ago · Apache-2.0 GitHub repository of Highest Lowest Breakout

Liquidity Entry Zones

by rosijay17-cmd
1 stars

A liquidity sweep entry tool built as a strategy. It stores recent swing highs and lows as liquidity levels, detects sweeps through them, checks that price reclaims and that the candle meets wick, body and range requirements in pips, then confirms within a sho

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 8 days ago · GPL-3.0 GitHub repository of Liquidity Entry Zones
1 stars

This strategy compares a 9-period EMA with a 21-period EMA of the close and uses their difference as a spread. It opens a long when the spread crosses above zero and a short when it crosses below zero, reversing the position through opposite entries. The EMA l

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Generic Type Annotation Tuple
1 stars

This strategy overlays price and combines SuperTrend, ADX, OBV, MACD, directional movement, EMA, and a volatility filter to decide long and short entries. Each filter can be switched on or off, and trading starts only after a chosen date. It can close when ena

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Percentile_SuperTrend_OBV&DI&EMA
1 stars

A Pine v5 strategy that fades price at VWAP standard deviation bands on the price chart. A long needs the low to reach the lower band with an up candle, and a short needs the high to reach the upper band with a down candle. An optional filter counts how many r

Strategy v5 Mean reversionVolume
Updated 8 months ago · None stated GitHub repository of VWapperAlgo VWAP Bands Strategy

Momentum Breakout

by knectardev
1 stars

This Pine Script strategy detects momentum breakouts on price charts by combining trend momentum signals with a volume filter. It enters trades when price breaks above resistance with volume 1.5 times average, reducing false signals. No specific stop loss or t

Strategy v5 Oscillators & momentumBreakout
Updated 9 months ago · None stated GitHub repository of Momentum Breakout

MACD 15 min

by tseitz
1 stars

A Pine v4 strategy that pairs a 12/26 MACD and 14-period RSI with rolling highs and lows over a short and a long lookback. Inputs set both lookbacks, take-profit and stop-loss percentages for longs and shorts, and a maximum number of adds. It tracks counts of

Strategy v4 Oscillators & momentumBreakout Repaints
Updated 4 years ago · None stated GitHub repository of MACD 15 min
330 stars

This strategy plots MACD line, signal line, Bollinger Bands, and RSI on the price chart. It signals long entries on MACD crossover above signal with RSI below 50 and price below BB basis, plus optional DMI filter. Short entries are available but disabled by de

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of MACD + BB + RSI [Alorse]
16 stars

This strategy enters long or short on Donchian channel breakouts and can add units when price moves in the trade direction and RSI confirms momentum. It sizes each unit from a risk percent of equity and exits with an ATR initial stop, a chandelier trail that t

Strategy v6 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of Seykota Alt 32: Momentum + Time

Diverlong F002

by ruckard
13 stars

Diverlong F002 is a price-chart strategy that enters on Squeeze Momentum divergences and exits on Curie closing moving-average lines. A short is taken when a light-green to dark-green squeeze section is smaller while price is higher; a long is taken on the opp

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Diverlong F002
5 stars

This strategy identifies shorting opportunities by calculating Fear and Greed zones based on price extremums relative to moving averages and standard deviation bands. It measures price deviation from recent highs or lows to detect extreme market conditions and

Strategy v4 Volatility & bandsMean reversion
Updated 3 years ago · Apache-2.0 GitHub repository of Fear + Greed Reversal Short Strategy
4 stars

The Simpleton STEPFUN Strategy combines signals from multiple technical indicators including RSI-2, MACD crossover, Bollinger Band squeeze, volume spikes, triple EMA, and Ichimoku cloud. It generates buy signals when the weighted ensemble meets or exceeds the

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 days ago · None stated GitHub repository of Simpleton STEPFUN Strategy

Alpy VIX

by avatar-lavventura
2 stars

Calculates the synthetic Williams VIX Fix indicator in a separate pane to detect market bottoms and volatility spikes. It computes standard deviation bands and percentile boundaries over customizable lookback periods, coloring histogram bars when volatility re

Strategy v4 Volatility & bandsMean reversion Repaints
Updated 7 months ago · None stated GitHub repository of Alpy VIX

Banmuxia MACD Divergence

by wynnforthework
2 stars

This strategy calculates a customizable MACD oscillator and histogram using either simple or exponential moving averages. It identifies pivot highs and pivot lows on the MACD histogram to detect momentum divergences against price action. Historical pivot point

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Banmuxia MACD Divergence

HMA Crossover

by pineforge-4pass
1 stars

A moving average crossover strategy using two Hull Moving Averages. It enters long when the fast HMA crosses above the slow HMA and short when it crosses below, reversing the position each time. Both lengths are adjustable, and both lines are drawn on the pric

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of HMA Crossover
1 stars

A trend continuation strategy that filters setups with ADX, rate of change, smoothed balance of power, an ATR expansion band, EMA 20 and 50 alignment and DI alignment. Entries can use pullback and reclaim, breakout or liquidity sweep triggers, with limits on e

Strategy v6 TrendVolatility & bands Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of LMSE-Lite Trend Continuation Risk Engine
1 stars

A strategy that trades a 10 and 21 period EMA crossover, going long on a cross up and short on a cross down. Each entry has an ATR-based stop, 2.5 times ATR by default, and a profit target at 2.5 times the stop distance. Position size comes from a chosen risk

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of TN Adaptive Risk Matrix

Pivot Trend RMA

by Snappni
1 stars

This strategy calculates a 10-period rolling moving average (RMA) alongside short-term pivot highs and pivot lows to identify trend alignment. It plots the RMA line directly on the price chart. Long entries trigger when price crosses the RMA while the RMA is r

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Pivot Trend RMA
1 stars

This overlay strategy combines SuperTrend, ADX, OBV, MACD, directional movement, EMA, and a volatility filter to open long or short trades sized as a percent of equity. Each filter and each side can be switched off. Users set EMA lengths, DI length, volatility

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Percentile_SuperTrend_OBV&DI&EMA

Momentum Breakout

by knectardev
1 stars

Momentum Breakout is an overlay strategy that identifies trading opportunities using Bollinger Bands breakout logic. It enters trades when price breaks out of the volatility bands without applying additional volume filtering. Risk management is handled through

Strategy v5 BreakoutVolatility & bands
Updated 9 months ago · None stated GitHub repository of Momentum Breakout
1 stars

A strategy that trades from a linear regression channel combined with three moving averages (base, slow and fast). It can take long and short deals, requires a minimum channel width, and sizes orders either as a share of equity or a fixed quantity. Exits scale

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of LinReg Quick Strategy

MACD Cross 2

by tseitz
1 stars

A long-biased Pine v4 strategy using a 12/26 MACD with a nine-period signal. It goes long on a green candle after three rising MACD bars below zero with MACD above signal, and short on the falling mirror. A percentage take-profit above the average entry closes

Strategy v4 Oscillators & momentumVolume Repaints
Updated 4 years ago · None stated GitHub repository of MACD Cross 2

NQU2023-10M V1

by dearvn
257 stars

The NQU2023-10M V1 strategy calculates 3-period simple moving averages of high and low prices alongside 3-bar price action patterns to detect short-term swings and trend reversals. It enters long or short trades when price action confirms a trend change condit

Strategy v5 TrendMoving averages
Updated 7 weeks ago · None stated GitHub repository of NQU2023-10M V1
106 stars

Adaptive Price Channel Strategy combines Donchian-style high/low channels with Average Directional Index (ADX) and ATR-based volatility offsets. It evaluates trend strength and directional movement to trigger entries when price crosses ATR-adjusted upper or lo

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Adaptive Price Channel Strategy
16 stars

A Donchian channel trend-following strategy featuring progressive breakeven stop-loss levels based on ATR (N). It enters on a 55-period Donchian breakout with an initial risk set at 2.0 N. As profit reaches key ATR milestones, the stop advances through progres

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 33: Progressive BE

EnlargedBodies A002

by ruckard
13 stars

This strategy executes trend-following trades directly on the price chart based on consecutive expanding candle bodies filtered by the 13-period exponential moving average. When price is above the EMA13, it enters long positions after three consecutive bullish

Strategy v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of EnlargedBodies A002

MACD Breakout Strategy

by jerryinyang
5 stars

This strategy evaluates breakout and trend-continuation signals using a higher-timeframe MACD and Stochastic RSI filter. It calculates MACD fast and slow exponential moving averages alongside Stochastic RSI overbought and oversold thresholds to identify histog

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of MACD Breakout Strategy

Kijun-Sen + SSL + WAE

by krosenfeld7
5 stars

This strategy combines Kijun-Sen baseline logic, the SSL Channel indicator, and the Waddah Attar Explosion (WAE) oscillator into an integrated entry framework plotted directly on the main price chart. It triggers long entries when price is above the Kijun-Sen

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Kijun-Sen + SSL + WAE
4 stars

This strategy combines nine technical indicators including RSI, SuperTrend, MACD, Triple EMA, Bollinger Bands, Ichimoku, HMA, Swing Failure Pattern, and Z-Score. Each indicator votes on long or short direction, with a Dynamic mode that weights votes based on m

Strategy v5 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Simpleton v0.06 Kimi_Cursor

Alpy Vix

by avatar-lavventura
2 stars

This strategy plots a Williams Vix Fix histogram in a separate pane and combines it with a WaveTrend oversold check and a rolling volume-weighted average price. It marks percentage bands above and below that VWAP for short and long conditions and can highlight

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

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