Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 24)

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

CCI Momentum

by pineforge-4pass
1 stars

A strategy built on the Commodity Channel Index, plotted in a separate pane with overbought, oversold and zero lines. It enters long when the CCI crosses up through the oversold level and short when it crosses down through the overbought level. Open positions

Strategy v6 Oscillators & momentum
Updated 7 days ago · Apache-2.0 GitHub repository of CCI Momentum

Kinetic Kalman Breakout

by kanylbullen
1 stars

A strategy that fits a two-state Kalman filter, tracking position and velocity, to the close price, then builds bands around the filtered price using a multiple of the mean absolute error. It goes long when the close crosses above the upper band and short when

Strategy v6 TrendBreakout
Updated 8 days ago · None stated GitHub repository of Kinetic Kalman Breakout

A strategy that trades the trend flips of a volatility band trend line, either on the original flip or on a close crossing the trend level, with entries confirmed on bar close. It can reverse on an opposite signal, filter by session or higher timeframe trend,

Strategy v6 TrendVolatility & bands
Updated 8 days ago · GPL-3.0 GitHub repository of Adaptive Trend Flow Strategy Optimized v6
1 stars

This Pine Script strategy detects pin bar patterns on the price chart using body size relative to ATR and shadow conditions for long and short signals. It applies engulfing candle confirmation and filters by EMA trend direction with volatility bands. Multiple

Strategy v6 TrendVolatility & bands
Updated 3 weeks ago · None stated GitHub repository of Pin Bar Strategy Developed

India CCF Nifty

by raybird
1 stars

A futures strategy for NSE Nifty that requires agreement from SuperTrend, a 3 and 13 EMA cross with a 21 EMA trend, MACD, RSI, ADX, volume and relative strength against a benchmark. Entries come in two stages with a larger setup ladder, so it can add to a posi

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of India CCF Nifty
1 stars

This long-only strategy buys short-term oversold dips only inside a strong uptrend: price above a rising 200-period SMA and within a set percentage of its one-year high. Entry needs a two-period RSI below a threshold, then an up-close, and volatility below an

Strategy v6 Mean reversionTrend
Updated 2 months ago · Custom licence GitHub repository of Regime-Gated Dip Reversion

Fractal Sweep Strategy

by abhinaynatraj
1 stars

A strategy port of the Fractal Sweep CISD indicator. It detects a sweep of a prior candle's extreme, a return and a CISD confirmation, then enters with a stop at the sweep extreme or CISD level and a take profit at a set R:R multiple. Shallow sweep and closed-

Strategy v5 SMC / ICT / price actionBreakout
Updated 3 months ago · None stated GitHub repository of Fractal Sweep Strategy

Pivot Breakout

by majohnst
1 stars

Pivot Breakout is an intraday strategy that identifies breakout opportunities using standard daily floor trader pivot points. It enters trades when price breaks above the calculated daily pivot, provided the prior daily close was within a defined approach dist

Strategy v6 BreakoutSupport & resistance Repaints
Updated 4 months ago · None stated GitHub repository of Pivot Breakout
1 stars

A strategy that rests a limit order at the session VWAP when a higher-timeframe 50 and 100 EMA stack shows an uptrend, VWAP is rising and price is above it, with the mirror image for shorts. The stop is an ATR multiple beyond VWAP and the target is a fixed rew

Strategy v6 Mean reversionTrend
Updated 4 months ago · None stated GitHub repository of VWAP Pullback Strategy MNQ
1 stars

This strategy identifies liquidity sweep scalp entries on lower timeframes by analyzing 15-minute higher-timeframe candles. It verifies a valid range candle using an EMA trend filter, average body size comparison, and wick balance thresholds. In an uptrend, it

Strategy v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of M15 Liquidity Sweep Scalp

Talons Inducement

by muammeryldrm42
1 stars

A strategy that looks for an inducement sweep: within the last three bars price wicks beyond the latest swing high or low found with a pivot lookback, then closes back inside. A long needs a bullish candle closing above the prior three highs, a short the mirro

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of Talons Inducement
1 stars

A long-only strategy built on a rolling cumulative volume delta estimated from where each bar closes within its range. It enters when buyers dominate by a set margin, price has stayed above a trend SMA for several bars, RSI is above a minimum and the session f

Strategy v6 VolumeTrend
Updated 5 months ago · None stated GitHub repository of Volume Delta Trend Reversal Long Only

LuxAlgo SMC Pro Ultimate

by Focal-QuantAI
1 stars

A strategy on the price chart that trades smart money concepts. It detects internal and swing market structure, order blocks and fair value gaps, and can require a fair value gap and a premium or discount position before entering. Optional filters use divergen

Strategy v6 SMC / ICT / price action
Updated 6 months ago · None stated GitHub repository of LuxAlgo SMC Pro Ultimate
1 stars

A strategy for range box breakouts whose header comments describe changes from an earlier version: a tighter ATR stop, a trailing profit exit that triggers later, an EMA 50 direction filter, a stricter volume filter and a higher box quality score. Orders are f

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

This long-only strategy automates staged entries and exits based on Bitcoin all-time high drawdowns and percentage gains. It scales into positions across five configured percentage drop levels from the highest recorded price. Profit taking occurs in five parti

Strategy v6 Support & resistanceTrend
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle [Infinity]
1 stars

This strategy looks for VWAP bounce and rejection trades on the price chart during the regular trading session. It marks a percentage band around session VWAP and enters when a rejection candle meets a minimum wick-to-body ratio and volume exceeds a multiple o

Strategy v6 Mean reversionVolume
Updated 7 months ago · MIT GitHub repository of VWAP Bounce/Rejection
1 stars

This strategy trades moving-average crossovers only when the higher timeframe agrees. It requests the higher-timeframe close and a trend moving average, then goes long when that trend is bullish and the fast average crosses above the slow average, and short wh

Strategy v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of MTF - Multi-Time Frame Strategy

The Basic Crossover

by propuchon
1 stars

A course example strategy that trades a simple moving average crossover. It goes long when a 14-period SMA crosses above a 28-period SMA and goes short when it crosses below, which reverses any open position. Both averages are plotted on the price chart. The l

Strategy v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of The Basic Crossover

NSE Infinity

by anil-sn
1 stars

A long-only strategy that enters on a close above the prior 20-bar high or on a cross back above a 50 EMA, in both cases only while price is above a 200 EMA. It holds one position sized at 90 percent of equity and exits when the close falls below a Chandelier-

Strategy v6 TrendBreakout
Updated 9 months ago · None stated GitHub repository of NSE Infinity

EZ Algo Debug Hedge

by turnupdigital
1 stars

A strategy that combines up to five external buy and sell signal sources, each with its own name and usage mode, and manages positions with ATR-based exits and an optional moving average exit. A switch chooses between faster intrabar exits and safer exits that

Strategy v6 Volatility & bands
Updated 1 year ago · None stated GitHub repository of EZ Algo Debug Hedge

Lab-Doi-05

by theteelek
1 stars

An experimental strategy lab script that simulates long, short and a second long position inside a date window, with a daily EMA 12 and EMA 26 cross as the trend filter. It tracks average entry prices, open profit, drawdown, win and loss counts and exchange fe

Strategy v6 Trend
Updated 1 year ago · None stated GitHub repository of Lab-Doi-05

Pivot Extension

by Studentcodee
1 stars

This strategy plots on the price chart and looks for confirmed pivot highs and lows using left and right lookback bars. It opens a long position when a pivot low is confirmed and a short position when a pivot high is confirmed. Position size defaults to the fu

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

TOTAL MTPI STRAT M_K

by Mikelkulla
1 stars

TOTAL MTPI STRAT M_K is a trend-following crypto market direction strategy that overlays multiple technical indicators on the price chart. It combines custom weighted moving averages, dynamic EMA ribbons, RMTA, and Kijun Sen baselines to evaluate overall marke

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of TOTAL MTPI STRAT M_K
1 stars

This strategy trades flips of the Parabolic SAR. It enters long when price closes above the SAR after being at or below it on the prior bar, and short on the opposite flip. Each trade has an ATR-based stop loss and take profit set by separate multipliers. Acce

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

This strategy detects divergences in MACD, MACD histogram, and RSI indicators to generate buy and sell signals on the price chart. It supports long and short positions with customizable take-profit and stop-loss percentages. The main settings allow switching b

Strategy v5 DivergenceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Divergence for Many [Dimkud]

Donchian Trend

by JoeTonDev
1 stars

A trend-following strategy that goes long when price closes above the prior 20-bar high while a fast EMA is above a slow EMA, and short on a close below the prior 20-bar low when the fast EMA is below. Positions close on a 10-bar opposite extreme, and an ATR-b

Strategy v5 BreakoutTrend
Updated 2 years ago · None stated GitHub repository of Donchian Trend

algo-trade-indian-v1

by akash-yellgetti
1 stars

A strategy-type script for the price chart that plots the high, low and midpoint of the first part of each session, using end hour and minute inputs, and marks those bars. It adds pivot-based support and resistance lines with left and right bar counts, labels

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

This strategy plots the built-in Supertrend line in green or red on the price chart. When the Supertrend value steps up it enters a long position, and when it steps down it enters a short position, so it stays in the market and reverses on each change. Each or

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MPL-2.0 GitHub repository of Hello World, Supertrend
1 stars

This strategy follows Supertrend, with a 10-period ATR and a multiplier of three by default. It goes long when price crosses above the Supertrend line and short when price crosses below, and also closes on the opposite cross. In addition, each trade has a perc

Strategy v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of Supertrend + Percentage Target and Stop
1 stars

Relative Volatility Index is a Pine v5 strategy that calculates a relative volatility index and draws Bollinger Bands, with a basis line and fill, in a separate pane with reference lines at 20 and 80. The index line itself is commented out of the plots. It goe

Strategy v5 Volatility & bandsMean reversion Archived
Updated 4 years ago · None stated GitHub repository of Relative Volatility Index

BTCUSDT Binance 5m

by tseitz
1 stars

A Pine v4 strategy that plots VWAP with one percent outer bands and tighter 0.8 percent inner bands. A long begins on a green non-doji candle whose high reaches the inner upper band, and a short on a red one reaching the inner lower band. Inputs set percentage

Strategy v4 VolumeScalping
Updated 4 years ago · None stated GitHub repository of BTCUSDT Binance 5m

MTF RSI

by Alorse
330 stars

This strategy enters long when price is above a long moving average and the RSI falls below an oversold level. It closes the long position when the RSI rises above an overbought level or price drops below the moving average. The RSI length, oversold and overbo

Strategy v5 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of MTF RSI

[TradersPost] Sick Sigma

by TradersPost
228 stars

Sick Sigma detects extreme statistical standard deviation moves (sigma events) to execute trades directly on the main price chart. The strategy supports both momentum and mean-reversion trading styles. Traders can configure calculation lookback periods, sigma

Strategy v6 Volatility & bandsMean reversion Repaints
Updated 3 months ago · None stated GitHub repository of [TradersPost] Sick Sigma

This overlay strategy backtests a dollar-cost-averaging bot on the price chart. It opens a long base order when the selected oscillator signals: MACD line cross, MFI or RSI below a threshold, or Stochastic RSI K crossing above D. Further orders average down by

Strategy v5 Oscillators & momentumMean reversion Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3Commas Bot DCA Backtester & Signals FREE

This overlay strategy combines a Nadaraya-Watson envelope, an RSI calculation, and an ATR stop-loss finder. With repainting off, it plots yellow upper and lower bands from a Gaussian endpoint estimate; with repainting on, it redraws the envelope on the last ba

Strategy v5 Oscillators & momentumVolatility & bands Repaints
Updated 3 years ago · MIT GitHub repository of Nadaraya-Watson Envelope, RSI, and ATR Stop Loss Finder

Take Profits & Stop Losses

by PythonForForex
64 stars

This educational strategy demonstrates moving average crossovers filtered by RSI momentum, incorporating ATR-based risk management. It calculates a 10-period SMA, a 30-period SMA, a 14-period RSI, and a 14-period ATR. Long entries trigger when the fast SMA cro

Strategy v5 Moving averagesOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Take Profits & Stop Losses

EMA Ribbon MACD v1

by iamrichardD
57 stars

This strategy combines an exponential moving average ribbon with MACD momentum indicators to identify trend-following entry and reversal signals. It draws in a separate pane, tracking MACD signal crossovers, zero-line crosses, and EMA structural alignments. En

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon MACD v1

Greeffer RSI Strategy

by SammyEnigma
18 stars

The Greeffer RSI Strategy is a basic momentum-based trading strategy that plots a 14-period Relative Strength Index (RSI) in a separate indicator pane. It generates long entry signals when the RSI falls to or below an oversold threshold of 29, and short entry

Strategy v4 Oscillators & momentum
Updated 6 years ago · None stated GitHub repository of Greeffer RSI Strategy
16 stars

A trend-following strategy based on Ed Seykota's Donchian breakout framework, modified to take a single full-risk entry instead of pyramiding multiple units. It enters long or short on 55-bar channel breakouts with ATR-based position sizing and an initial stop

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 15: Single Position

Crossing EMAs D

by ruckard
13 stars

Crossing EMAs D is a moving average crossover strategy designed to automate trade execution through Zignaly webhook and email integration. It detects simple moving average crossovers (14-period and 28-period) and formats detailed payload alert messages for cry

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Crossing EMAs D

My Strategy

by hirawatt
11 stars

This strategy plots five exponential moving averages of typical price on the price chart and treats a fully ordered stack as a trend signal. It enters long when the averages rise in order or when the 14-period RSI crosses above 60.5, and short on the opposite

Strategy v4 TrendMoving averages
Updated 2 years ago · MIT GitHub repository of My Strategy

Ichimoku Cloud - Eterna

by EternaHybridExchange
9 stars

This strategy calculates standard Ichimoku Cloud components, including the conversion line, base line, and displaced leading spans. It opens long positions when price resides above a bullish cloud and the conversion line crosses above the base line. Short entr

Strategy v5 Trend
Updated 7 months ago · MIT GitHub repository of Ichimoku Cloud - Eterna

Order Block Strategy

by muammeryldrm42
7 stars

This strategy identifies bullish and bearish order blocks using an average true range impulse filter and plots corresponding boxes on the price chart. It enters positions on price retests of the order block zones, optionally filtered by an exponential moving a

Strategy v5 SMC / ICT / price actionTrend
Updated 3 months ago · MIT GitHub repository of Order Block Strategy

This strategy generates trading signals based on crossovers between daily session VWAP and a 4-hour 90-period Exponential Moving Average (EMA). When VWAP crosses above the 4-hour EMA, the strategy closes open short positions and enters a long trade with full e

Strategy v5 TrendMoving averages Repaints
Updated 3 years ago · MIT GitHub repository of 4H Bullish Buy 4H Bearish Sell Session
6 stars

This strategy example builds TradersPost webhook JSON messages and plots them as colored labels on the price chart. At fixed clock hours it shows a long with a trailing-stop percent, an add, a cancel, an exit, a short with a trailing-stop price, a flatten, and

Strategy v5
Updated 1 year ago · None stated GitHub repository of WebhookMessage Test Strategy

This strategy executes long positions by combining a 200-period EMA trend filter, Stochastic RSI oversold crosses, and Williams Alligator retracements, supplemented by RSI divergence detection. It triggers long entries when the price trades above the 200 EMA w

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 200 EMA + Alligator + Stochastic Long Strategy

AG Momentum Breakout

by eltonaguiar
4 stars

AG Momentum Breakout is a strategy that identifies continuation signals after pullbacks in trending markets. It filters for uptrends using EMAs and detects recent pullbacks via RSI conditions before entering on RSI crossovers above 50 with ADX confirmation. Th

Strategy v6 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of AG Momentum Breakout

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