Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 52)

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

106 stars

This strategy calculates the WaveTrend oscillator from HLC3 averages and its smoothed difference to generate long signals on BTC price charts. It enters positions when WT1 crosses above WT2 and stays below a limit value. Stop loss triggers at the recent bar lo

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BTC WaveTrend R:R=1:1.5
13 stars

This Pine Script v5 strategy draws on the price chart and sends TradingView orders toward Zignaly. It uses a selectable moving average, defaulting to a 200-period EMA of close, together with an SSL calculation based on a 10-period SMA. The user can trade long

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard TradingZone SSL EMA
7 stars

This strategy plots RSI on the price chart and enters a long when RSI falls below the oversold level or a short when it rises above the overbought level, only while flat. It exits with a take profit and stop loss measured in pips from the current close. Inputs

Strategy v6 Oscillators & momentumScalping
Updated 3 months ago · None stated GitHub repository of XAUUSD 1-Minute Scalping Strategy

J8 30 123 SPY Scalping PRO 2 Jerry is an overlay strategy designed for short-term SPY scalping and spread setups. It combines multiple Exponential Moving Averages with a custom Supertrend calculation based on flexible moving average types and ATR lengths to pl

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of J8 30 123 SPY Scalping PRO 2 Jerry

This strategy executes trades based on fast and slow exponential moving average crossovers constrained by a configurable intraday session window. Long positions open on bullish EMA crosses and short positions open on bearish EMA crosses when no existing positi

Strategy v6 Moving averagesSessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 4ema-rsi-probe-03-binary-bar-window
1 stars

This strategy identifies trend momentum shifts using a Twin Range Filter (TRF) oscillator and volatility regime gates. It calculates the ratio of fast and slow price ranges, smooths it through a double exponential moving average, and signals entries when the s

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Katana Flow v6

BTC/USD - RSI

by hasnocool
106 stars

This strategy calculates the Relative Strength Index (RSI) to generate mean-reversion signals based on multi-tier overbought and oversold thresholds. When the RSI falls below the oversold levels without an active trade, it enters a long position; conversely, w

Strategy v5 Oscillators & momentumMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of BTC/USD - RSI
13 stars

This strategy runs on the price chart to identify trade entries using volume sequences, specifically tracking consecutive declining volume candles followed by a volume surge at lower price levels. It provides webhook execution support for Zignaly copy trading

Strategy v5 VolumeVolatility & bands
Updated 1 year ago · None stated GitHub repository of Ruckard Voladder A002

This intraday strategy is designed for short-term scalping on equity and index markets like SPY. It evaluates price movement using configurable exponential and Hull moving averages combined with an ATR-based Supertrend calculation. The script plots signal arro

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of J8 30 123 SPY Scalping PRO 2 Jerry

PF Probe 50 - Stop Limit Trail

by pineforge-4pass
1 stars

PF Probe 50 - Stop Limit Trail is a synthetic validation strategy designed to test simultaneous exit conditions. It opens long positions at 08:15 and short positions at 16:15 when flat. Position exits utilize a single bracket exit command incorporating an ATR-

Strategy v6 Volatility & bandsSessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF Probe 50 - Stop Limit Trail
1 stars

A Keltner channel breakout strategy. It goes long when the close crosses above the upper band and short when it crosses below the lower band, only if ADX is above a threshold and price is on the matching side of a 200 EMA. Each trade exits at the channel midli

Strategy v6 BreakoutVolatility & bands
Updated 2 months ago · None stated GitHub repository of TN Sovereign Keltner
106 stars

This strategy enters a long position on Monday when the bar falls inside the 14:00 to 16:01 session window. It closes that long on Tuesday during the same window, or earlier if price hits a percentage stop loss or take profit measured from the average entry pr

Strategy v5 Sessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of Buy Monday, Exit Tuesday
13 stars

Ruckard Voladder B002 is a price-chart strategy that opens long trades after three or more consecutive candles of falling volume, followed by a higher-volume candle, while price is lower across that span. The comments leave the long exit logic uncertain. By de

Strategy v5 Volume
Updated 1 year ago · None stated GitHub repository of Ruckard Voladder B002

J8 Refactor

by g-moe
3 stars

J8 Refactor is a multi-indicator trading strategy that combines a custom Supertrend, multiple moving average filters, RSI levels, and MACD logic with Bollinger Bands. It executes entries based on multi-condition alignment and offers customizable exits, includi

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of J8 Refactor
1 stars

This validation strategy tests TradingView trailing stop execution semantics using trail points and trail offset parameters without accompanying fixed stop or take-profit orders. It opens a long position at 09:15 and a short position at 15:15 when flat, tracki

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF Probe 51 - Trail Points Offset
1 stars

A strategy that trades liquidity sweeps on the price chart. A bullish sweep is a low below the lowest low of the prior 20 bars that closes back above it with a lower wick longer than a set multiple of the body; a bearish sweep mirrors this at the highs. A volu

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TN Sovereign Liquidity Hunt
106 stars

This strategy enters a long position on Monday when the current bar falls inside the 1400-1601 session window. It closes that long on Wednesday inside the same window, and also exits at a percentage stop loss or take profit. Default stop loss is 4 percent and

Strategy v5 Sessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of Buy Monday, Exit Wednesday

OutSide Bar Strategy

by TWODS-CAPITAL
37 stars

The OutSide Bar Strategy identifies outside bar candlestick patterns directly on the main price chart. It triggers a long entry when a bar's high exceeds the previous high and its low drops below the previous low, provided the bar closes higher than its open.

Strategy v5 Candlestick patternsBreakout
Updated 3 years ago · MIT GitHub repository of OutSide Bar Strategy
13 stars

This price-chart strategy looks for a long volume pattern: three or more candles with falling volume, then a higher-volume candle, while price is lower from the start of that sequence to the end. Long strict mode is on by default and short strict mode is off.

Strategy v5 Volume
Updated 1 year ago · None stated GitHub repository of Ruckard Voladder C002

PF probe 52 - stop entry cancel

by pineforge-4pass
1 stars

This strategy compares an 8-period EMA with a 21-period EMA on the price chart. When the fast average is above the slow average it places a long stop at the prior bar high and cancels the pending short; otherwise it places a short stop at the prior bar low and

Strategy v6 Moving averagesBreakout Repaints
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 52 - stop entry cancel
1 stars

TN Sovereign Lorentzian v6 is a quantitative strategy that classifies price action regimes using multi-dimensional indicators and causal volume auditing. It generates entry signals based on RSI center-line crossovers, 10-period momentum, and price alignment re

Strategy v6 AI / machine learningTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign Lorentzian v6

This strategy takes long trades only. It enters when a fast simple moving average crosses above a slower one and either weekly CCI or ADX meets its threshold, depending on the toggles. It closes the long when price falls below a third moving average, and it ca

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Buy Only Strategy with Dynamic Re-Entry and Exit
13 stars

This strategy identifies volume-based rebound signals on the price chart. It detects three or more consecutive lower volume candles followed by a higher volume candle, with price remaining lower from the start of the volume sequence, signaling potential long e

Strategy v5 VolumeBreakout
Updated 1 year ago · None stated GitHub repository of Ruckard Voladder D002
3 stars

The Jerry Buy Zone Strategy calculates standard MACD line values and applies Bollinger Bands directly to the MACD line to identify momentum breakouts. Long entries trigger when the MACD line crosses above zero while remaining above the upper Bollinger Band, or

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Jerry Buy Zone Strategy
1 stars

PF probe 53 - stop touch boundary is a strategy that draws on the price chart. It checks for specific UTC hours (2:15 for long, 14:15 for short) and enters a long position when no position exists by placing a stop order one tick beyond the previous bar's high.

Strategy v6 Sessions & timeSupport & resistance
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 53 - stop touch boundary
1 stars

This strategy executes trades based on MACD line crossovers filtered by trend direction and histogram slope. Long positions open on bullish MACD crossovers when price is above the trend EMA and histogram momentum is rising. Short positions open on bearish cros

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Tn Sovereign MACD v6

This Pine Script strategy detects bullish engulfing candlestick patterns to generate buy and sell signals overlaid directly on the price chart. It supports backtesting over a user-defined date range with inputs for profit target, stop loss percentage, order si

Strategy v5 Candlestick patterns
Updated 2 years ago · GPL-3.0 GitHub repository of Buy&Sell Bullish Engulfing - The Quant Science

History SAW demo

by be-thomas
65 stars

History SAW demo is a TradingView documentation example script that demonstrates basic long position entry execution. The script enters a long position on every bar, building positions up to a maximum pyramiding limit of 100 entries. Orders are re-evaluated on

Strategy v4
Updated 6 days ago · GPL-3.0 GitHub repository of History SAW demo

Parabolic SAR Strategy

by TWODS-CAPITAL
37 stars

This strategy implements a custom Parabolic SAR algorithm to generate trend-following entries. It plots current and next-bar SAR levels directly on the main price chart. When the SAR flips, the strategy places stop orders to reverse positions from long to shor

Strategy v5 Trend
Updated 3 years ago · MIT GitHub repository of Parabolic SAR Strategy
13 stars

This strategy looks for a long rebound after three or more candles of falling volume followed by a higher-volume candle, while price is lower across that span. It is written as a Zignaly-linked TradingView strategy and was noted for BTCUSDT on the one-hour cha

Strategy v5 Volume
Updated 1 year ago · None stated GitHub repository of Ruckard Voladder E007

Trend Trader Strategy

by eddiebelaval
7 stars

Calculates a dynamic trend level based on recent highest and lowest prices adjusted by a weighted moving average of Average True Range. It plots the Trend Trader Line directly on the price chart and colors bars according to the active trend direction. Long ent

Strategy v5 TrendVolatility & bands
Updated 3 months ago · None stated GitHub repository of Trend Trader Strategy

PF probe 54 - MTF roll state

by pineforge-4pass
1 stars

This strategy detects roll states in multiple timeframes to generate trading signals on the price chart. It fetches close prices from 60m, 240m and daily bars using request.security. Long entries trigger on a 60m roll up with flat 240m state or on a daily high

Strategy v6 TrendBreakout
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 54 - MTF roll state

TN Sovereign Market Structure v6 is an overlay strategy that identifies market structure breaks and trends using pivot points, a 50-period Exponential Moving Average (EMA), and the Ichimoku Cloud. It detects Break of Structure (BOS) signals when price closes p

Strategy v6 SMC / ICT / price actionTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign Market Structure v6

This boilerplate strategy script acts as a customizable template for generating buy and sell signals based on price or source crossovers relative to defined fixed values. Users can select an input source, set threshold values, and specify whether to trigger en

Strategy v5 Support & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of Buy/Sell Signal Template/Boilerplate Strategy [ExoMaven]
13 stars

Ruckard Walcrypto DoubleDonchian is a trend-following breakout strategy built on two Donchian Channels with an optional exponential moving average filter. Position entries trigger when price achieves a new high or low on the primary channel, provided the optio

Strategy v5 TrendBreakout
Updated 1 year ago · None stated GitHub repository of Ruckard Walcrypto DoubleDonchian
3 stars

This trading strategy evaluates moving average slope and concavity changes to identify trend direction and entry signals. Traders can choose between Hull, EMA, SMA, WMA, or ALMA moving averages, filtered by secondary trend EMAs for long and short positions. Si

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Jerry Strategy / Dashboard
1 stars

This strategy is a validation probe that isolates an implicit reversal exit. When flat at 00:15 it enters one long unit. At 00:45 an opposite short entry of quantity one closes that long and opens a short. At 01:15 an opposite long entry reverses back to long.

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 55 - entry reversal implicit exit
1 stars

This multi-timeframe strategy combines higher-timeframe trend context with lower-timeframe execution. It evaluates macro trend direction on a higher timeframe using Exponential Moving Average crosses and a Supertrend indicator. On the lower timeframe, entry si

Strategy v6 TrendMoving averages Repaints
Updated 2 months ago · None stated GitHub repository of TN Sovereign MTF Dual-Layer v6

Buy/Sell Strat

by hasnocool
106 stars

This strategy plots a fast and a slow exponential moving average on the price chart and trades their crossovers. It enters long when the fast average crosses above the slow average, volume is above 85 percent of the prior five-bar average, and price is above t

Strategy v5 TrendMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Buy/Sell Strat

Pivot Extension Strategy

by TWODS-CAPITAL
37 stars

The Pivot Extension Strategy identifies local high and low pivot points based on user-defined left and right bar counts. It enters a long position when a pivot low is detected and enters a short position when a pivot high is confirmed. The strategy toggles bet

Strategy v5 Support & resistance
Updated 3 years ago · MIT GitHub repository of Pivot Extension Strategy

This strategy executes breakout trades using two Donchian Channels alongside an optional 200-period EMA trend filter. Entries trigger when the price sets a new highest high or lowest low over the primary Donchian Channel period. Exits are managed via a shorter

Strategy v5 BreakoutTrend
Updated 1 year ago · None stated GitHub repository of Ruckard Walcrypto DoubleDonchian B002
1 stars

This strategy isolates trailing-stop exits that use trail points and a trail offset without a paired stop or limit. It enters one long unit at 09:15 and one short unit at 15:15 when flat, then arms a trailing exit for the open side. Trail points and trail offs

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 56 - trailing activation path
1 stars

This Pine Script v6 strategy uses multi-timeframe analysis to identify intraday trends and generate trading signals. It requests higher-timeframe data for trend context via EMAs and Supertrend direction. On the local timeframe it plots EMA cross signals for lo

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign MTF Intraday v6
106 stars

This strategy executes high-pyramiding trades using a combination of dynamic support and resistance breakout channels, the Supertrend indicator, and an array of predefined price levels. It tracks recent 100-bar extremes to permit buys on breakouts and manages

Strategy v5 TrendSupport & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of Buy/Sell Test for More Freq
13 stars

This script provides a standardized Pine Script strategy framework for connecting TradingView alerts directly to the Zignaly automated trading platform. It structures webhook and email payload messages with exchange options, leverage, secret keys, and position

Strategy v5 Sessions & time
Updated 1 year ago · None stated GitHub repository of Ruckard Zignaly Template
1 stars

PF Probe 57 is a Pine Script validation strategy designed to test stop-entry position reversals following pyramided entries. It builds a multi-lot long position at specific intraday times, triggers short and long stop-entry reversal orders based on bar high an

Strategy v6
Updated 7 days ago · Apache-2.0 GitHub repository of PF Probe 57 - Stop Reversal Grouping

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