Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 4)

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

3 stars

This Pine Script strategy plots a G-Channel and a 200-period Exponential Moving Average (EMA) directly on the price chart. It triggers buy signals when price crosses the lower G-Channel line while trading below the EMA line. Long positions are managed using Av

Strategy v4 TrendMoving averages
Updated 2 years ago · Apache-2.0 GitHub repository of G-Channel & EMA Strategy with ATR SL/TP

Larry Williams 9.1

by leocairos
3 stars

This strategy tracks directional shifts in a 9-period Exponential Moving Average (EMA) to identify trend reversals based on the Larry Williams 9.1 setup. It plots the 9 EMA on the main chart and generates a long signal when the EMA turns upward after declining

Strategy v5 TrendMoving averages
Updated 2 years ago · MIT GitHub repository of Larry Williams 9.1

EMA Crossover

by mr-s8
3 stars

This strategy plots a fast and a slow exponential moving average on the price chart. It enters long when the fast average crosses above the slow average and short when it crosses below. Each entry sets a percentage take profit and stop loss from the close of t

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-2.0 GitHub repository of EMA Crossover
3 stars

This strategy calculates 50-period and 200-period exponential moving averages alongside a standard Moving Average Convergence Divergence (MACD) oscillator. It plots the moving averages and the MACD histogram directly on the price chart. The strategy opens a lo

Strategy v5 Oscillators & momentumMoving averages
Updated 4 years ago · None stated GitHub repository of 5min Scalping EMA50, EMA200, MACD

Combined Script

by maxits
3 stars

Strategy combining EMA and SMA trend alignment with pin bar candle patterns and moving average piercing. It triggers trades in the direction of the moving average fan when a pin bar forms, managing positions using an ATR-based stop loss, pip-based profit targe

Strategy v4 Moving averagesCandlestick patterns
Updated 4 years ago · None stated GitHub repository of Combined Script

Btc Version5pine

by WMW333
3 stars

This strategy detects volume-based trading signals on Bitcoin perpetual futures. It calculates volume spikes on green and red candles along with ATR for volatility filtering. Long entries trigger on red candles with high volume and specific spike conditions wh

Strategy v5 VolumeVolatility & bands
Updated 4 years ago · None stated GitHub repository of Btc Version5pine

Carmelita Adelina Leandro by Professor Theta is an intraday signal script designed for futures charts. It calculates VWAP and a 9-period Exponential Moving Average to identify trend reversal triggers. Long and short entry signals are evaluated based on open pr

Strategy v5 TrendMoving averages
Updated 4 years ago · Unlicense GitHub repository of Carmelita Adelina Leandro by Professor Theta

This strategy combines Bollinger Bands and Bollinger Band Width to trigger breakout trades during periods of low volatility. It opens long positions when price crosses above the upper band while band width is below its 100-period moving average, and opens shor

Strategy v5 TrendVolatility & bands
Updated 4 years ago · CC0-1.0 GitHub repository of Greeffer's Bolinger Band Hedge Strategy

MomGulfing

by rasimandiran
3 stars

MomGulfing is a momentum strategy that identifies trade setups using multi-bar engulfing candlestick patterns paired with volume confirmation. It triggers long or short entries when price breaks key candle bounds across one to three bars while volume expands.

Strategy v5 Candlestick patternsOscillators & momentum
Updated 4 years ago · MIT GitHub repository of MomGulfing

BB RSI Strategy

by infinityhao
3 stars

BB RSI Strategy combines Bollinger Bands, RSI, and multiple simple moving averages directly on the main price chart. It enters long positions when price drops below the lower Bollinger Band while RSI is below a set limit, and enters short positions when price

Strategy v4 Volatility & bandsOscillators & momentum Repaints
Updated 5 years ago · None stated GitHub repository of BB RSI Strategy

BTC MA Accumulation v1

by yalili8521
2 stars

BTC MA Accumulation v1 is a scalping strategy designed primarily for 1-minute Bitcoin charts. It identifies trend continuation by requiring a triple moving average stack alongside steady price accumulation or distribution. The script counts consecutive rising

Strategy v6 TrendMoving averages
Updated 8 days ago · None stated GitHub repository of BTC MA Accumulation v1

Sell-Only Strategy

by karma659
2 stars

This short-only strategy identifies sell setups by combining a 3-period RSI overbought condition with a bearish engulfing candlestick pattern. It triggers short entries when the open RSI exceeds 70 and momentum turns downward alongside a bearish engulfing bar.

Strategy v5 Oscillators & momentumCandlestick patterns
Updated 10 days ago · None stated GitHub repository of Sell-Only Strategy

VCP Silver Tier Strategy

by alejandr02820
2 stars

The VCP Silver Tier Strategy is a MACD-based trading system in Pine Script v5 that draws signals on the price chart. It computes the MACD line using fast length 12, slow length 26, and signal length 9. Long entries fire on MACD crossover below zero; short entr

Strategy v5 TrendOscillators & momentum
Updated 2 weeks ago · Custom licence GitHub repository of VCP Silver Tier Strategy

FortiTrade Elite Multi-Strategy with DeepSeek Turbo is an overlay trading strategy that combines trend-following, momentum scalping, grid bounds, and external signal inputs. It calculates dynamic volatility-adjusted RSI, adaptive fast and slow EMAs, Bollinger

Strategy v6 TrendOscillators & momentum
Updated 3 weeks ago · MIT GitHub repository of FortiTrade Elite Multi-Strategy with DeepSeek Turbo

Bridge Protocol Example

by propfirmgorilla
2 stars

This example strategy demonstrates how to format Pine Script order alerts into JSON payloads for automated execution engines. It generates entry signals using a 10-period and 30-period simple moving average crossover and calculates protective stop-loss prices

Strategy v5 Moving averagesTrend
Updated 6 weeks ago · MIT GitHub repository of Bridge Protocol Example

Trust Me Bro Strategy

by moonyroy
2 stars

A trading strategy that uses an RSI state machine tracking 50-level crossovers, pullbacks, and hidden divergences. Entries require confirmation from optional confluence filters, including an EMA touch, Fibonacci retracement zones, and Ichimoku cloud conditions

Strategy v6 Oscillators & momentumDivergence
Updated 7 weeks ago · MIT GitHub repository of Trust Me Bro Strategy
2 stars

This overlay strategy enters long when a fast EMA crosses above a slow EMA, the candle closes above the fast EMA and above its open, and volume is at least a set multiple of its SMA. Position size defaults to 95 percent of equity with no pyramiding. It exits w

Strategy v5 TrendMoving averages
Updated 8 weeks ago · None stated GitHub repository of EMA20/50 ATR Trail Spot

Market Mind Reader

by Lapommeray
2 stars

Market Mind Reader is an overlay strategy that generates buy and sell signals based on user-defined inputs for Federal Reserve bias, DNA pattern states, and liquidity directions. It evaluates alignment across these inputs to calculate a signal confidence score

Strategy v5 SMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Market Mind Reader

A-SLP DEMALONG 6M

by danielvm-git
2 stars

This strategy plots up to three double exponential moving averages on the price chart and flags crossovers and crossunders between them. With the third length at zero, it compares the first and second DEMAs; other length combinations change which series is use

Strategy v4 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of A-SLP DEMALONG 6M

FYP Bot 1

by aleks-drozy
2 stars

This strategy executes trades based on a combination of Smart Money Concepts, including Inverse Fair Value Gaps (IFVG) and Change in State of Delivery (CISD) structure breaks. Entries require confluence between IFVG flips, structural CISD breaks, a 20-period e

Strategy v6 SMC / ICT / price actionTrend
Updated 2 months ago · MIT GitHub repository of FYP Bot 1

XAUUSD Breakout Grid

by Young666YHF
2 stars

The XAUUSD Breakout Grid strategy executes market orders when price crosses defined dollar-denominated grid levels on the price chart. It tracks entries using array structures and dynamically adjusts position sizing to balance net exposure between long and sho

Strategy v6 BreakoutSupport & resistance
Updated 4 months ago · None stated GitHub repository of XAUUSD Breakout Grid

QTrade MACD

by Can3299
2 stars

QTrade MACD is a trend-following momentum strategy that enters positions on MACD histogram crossovers. Entry signals are filtered using SuperTrend direction alignment, zero-line position rules, and zero-line distance tolerance checks. Stop loss levels are esta

Strategy v6 TrendOscillators & momentum
Updated 5 months ago · AGPL-3.0 GitHub repository of QTrade MACD
2 stars

This strategy executes long trades based on a 50 and 200 SMA golden cross and manages exits using a dynamic trailing stop. Upon entry, it places an initial stop loss at the lowest low of the previous lookback bars. Whenever price prints a new high over the spe

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of 2-Bar Trailing Stop Strategy

BB Breakout Reversal Strategy

by WayneMoore1006
2 stars

This quantitative strategy calculates custom Bollinger Bands using a standard moving average and standard deviation multiplier. It generates long entry signals when the bar close breaks above the upper band, and short entry signals when the close breaks below

Strategy v6 Volatility & bandsBreakout
Updated 6 months ago · None stated GitHub repository of BB Breakout Reversal Strategy

MTF Signal Strategy

by Flopchamp
2 stars

The MTF Signal Strategy is designed for 1-minute charts to identify trade entries using multi-timeframe EMA trends, Opening Range Breakout (ORB) levels, key daily high/low levels, and custom pivot zones. It generates trade signals on bar closes when price alig

Strategy v5 TrendBreakout
Updated 7 months ago · None stated GitHub repository of MTF Signal Strategy
2 stars

This strategy executes trend-following scalping setups by combining fast and slow exponential moving averages with a smoothed Stochastic oscillator. It enters long positions when the fast EMA is above the slow EMA and the Stochastic is oversold, and short posi

Strategy v5 TrendOscillators & momentum Repaints
Updated 7 months ago · None stated GitHub repository of WINNER MNQ Strategy - Optimized 2026

Hari Sweep Scalper

by godlesscherry
2 stars

This overlay strategy looks for Bollinger Band and optional fractal sweeps only in the Supertrend direction, with an optional MACD filter. Long and short setups expire after a set number of bars, and the first bar after a Supertrend flip is ignored. It enters

Strategy v6 TrendVolatility & bands
Updated 7 months ago · None stated GitHub repository of Hari Sweep Scalper

alpyvix

by avatar-lavventura
2 stars

This strategy implements a self-calibrating WaveTrend oscillator with rolling percentile-based dynamic entry zones rather than fixed levels. It enters long positions when the oscillator enters lower percentile zones and short positions in upper percentile zone

Strategy v6 Oscillators & momentumVolatility & bands
Updated 7 months ago · None stated GitHub repository of alpyvix
2 stars

This Pine Script v5 strategy calculates two simple moving averages with customizable fast and slow lengths and plots them on the price chart. It generates long signals on fast MA crossover above the slow MA and short signals on the reverse crossover. The strat

Strategy v5 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of MA Crossover Strategy with SL/Targets

EMA Trend Surfer

by nxtaiapp
2 stars

EMA Trend Surfer is a dual-timeframe trend-following strategy designed for index futures such as MES and MNQ. It determines overall trend direction using fast and slow exponential moving averages on a higher timeframe while seeking entry signals on a lower tim

Strategy v5 TrendMoving averages
Updated 11 months ago · MIT GitHub repository of EMA Trend Surfer

2Mars - MA / BB / SuperTrend

by wynnforthework
2 stars

This strategy combines moving averages, Bollinger Bands, and SuperTrend indicators to generate long and short entry signals. It uses configurable moving average crossovers and Bollinger Band threshold levels for trade execution, complemented by optional SuperT

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of 2Mars - MA / BB / SuperTrend

RSI Strategy

by vanAmsen
2 stars

The RSI Strategy plots the Relative Strength Index (RSI) on the chart with oversold and overbought level lines. Long entries trigger when RSI crosses above the oversold threshold, and short entries when it crosses below the overbought threshold. Positions exit

Strategy v5 Oscillators & momentum
Updated 1 year ago · GPL-3.0 GitHub repository of RSI Strategy

Logan Bollinger Bands

by RsKBruno
2 stars

This Pine Script strategy plots Bollinger Bands on the price chart using a central line and standard deviation for volatility detection. It includes an optional EMA trend filter and ADX strength filter to refine signals. The strategy allows buy or sell entries

Strategy v5 Volatility & bandsMoving averages
Updated 1 year ago · MIT GitHub repository of Logan Bollinger Bands

Startegy

by orenkats
2 stars

This strategy draws on the price chart and sizes positions from account equity, a risk percent, and a leverage multiplier. It tracks long and short stops, pending add-on entries, limit and stop order offsets, and a percentage profit target. Settings change lin

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of Startegy

Wavy Tunnel MS3

by algoboss710
2 stars

The Wavy Tunnel MS3 strategy plots multiple exponential moving averages to form a wavy tunnel on the price chart. It computes wavy high, close, and low lines using 34-period EMAs, along with 144- and 169-period tunnel lines and a 12-period EMA. Optional RSI an

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Wavy Tunnel MS3

ATR Reversion System

by Web3Degenerate
2 stars

The ATR Reversion System is a long-only mean-reversion strategy that plots ATR bands around a short-term EMA (20) and a long-term EMA (200) filter on the price chart. It signals entries by checking if the close is below the bottom ATR band and above the long E

Strategy v5 Mean reversionMoving averages
Updated 2 years ago · None stated GitHub repository of ATR Reversion System

Ichimoku Cloud Strategy

by mhiproducts
2 stars

This strategy calculates modified Ichimoku components using moving averages of high and low values to identify trend directions. It evaluates market outlook based on price relative to Senkou Span lines and generates signals when the Tenkan-Sen crosses the Kiju

Strategy v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Ichimoku Cloud Strategy

BB & RSI & MACD

by Sauyang520
2 stars

This trading strategy combines Bollinger Bands, Relative Strength Index (RSI), and Moving Average Convergence Divergence (MACD) to generate trading signals. It enters positions based on price interactions with Bollinger Bands alongside RSI overbought or overso

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · None stated GitHub repository of BB & RSI & MACD
2 stars

This strategy builds a spot grid on the price chart from a user-set upper price and a percentage spacing. It calculates ten descending levels, plots the upper and lower bounds, and allows up to ten stacked entries sized as a percentage of equity. Orders are pr

Strategy v5 Support & resistanceMean reversion
Updated 3 years ago · None stated GitHub repository of 그리드현물매매전략

Bollinger Bands Strategy

by TravisLeeRichardson
2 stars

This strategy plots standard and dual-level Bollinger Bands on the main price chart to generate breakout signals. It enters a long position when the price crosses above the upper band and enters a short position when the price crosses below the lower band. Pos

Strategy v5 Volatility & bandsMoving averages
Updated 3 years ago · None stated GitHub repository of Bollinger Bands Strategy
2 stars

This strategy starter boilerplate serves as a backtesting template that overlays directly on the price chart. It sets default position sizing to twenty percent of equity and calculates an exponential moving average alongside high and low price thresholds. Inpu

Strategy v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of [CBB] 2023 Strategy Default

Mini-Project

by Core-Four
2 stars

Mini-Project is a customizable multi-indicator strategy that enables traders to combine entry signals from Linear Regression, RSI, MACD, Parabolic SAR, and Supertrend. Users can toggle individual technical filters on or off to drive trade entries or enable a c

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Mini-Project

MultiStrategy-LazyBear

by sassiz-root
2 stars

This overlay strategy combines optional scalp and swing modes for crypto charts. It filters trades with a higher-timeframe ADX reading, stochastic bands, and a price channel defined by amplitude and deviation. Long or short direction is selected by trend toggl

Strategy v5 TrendOscillators & momentum Repaints
Updated 3 years ago · MIT GitHub repository of MultiStrategy-LazyBear

Backtester For Anything

by theupslidedown
2 stars

This strategy serves as a backtesting template for any trading system. It accepts external signals to trigger long or short entries and exits, with optional filters based on EMA and ADX indicators to refine conditions. Time-based restrictions limit trading to

Strategy v5 Screeners & dashboardsTrend Repaints
Updated 3 years ago · None stated GitHub repository of Backtester For Anything

Strategy

by seanhung07
2 stars

This script provides a scaffolding template for Pine Script strategies. It establishes framework logic for trade direction toggles, custom backtest date ranges, and percentage-based stop-loss and take-profit calculations. Long and short entry triggers are left

Strategy v5
Updated 4 years ago · None stated GitHub repository of Strategy

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