Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 3)

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

4 stars

This strategy overlays asymmetric Bollinger Bands built on a Weighted Moving Average of hlc3. It opens long positions on an upside breakout above the upper band, confirmed by positive momentum and candle structure filters. Positions exit only when the closing

Strategy v6 BreakoutMoving averages
Updated 5 months ago · None stated GitHub repository of Bollinger WMA (Long Only)

SHODAN9 Katana

by Narymunt
4 stars

SHODAN9 Katana is a trend-following strategy that generates trading signals using Heikin-Ashi candle color transitions. It enters long positions on the first green Heikin-Ashi candle after a series of red candles and enters short positions on the first red can

Strategy v6 TrendCandlestick patterns
Updated 5 months ago · BSD-3-Clause GitHub repository of SHODAN9 Katana

Template

by 1zerolog
4 stars

This strategy serves as a modular foundation for developing custom trading systems in Pine Script v6. It provides leverage-adjusted position sizing, date range filtering, and trade execution handlers, while leaving entry conditions open for user-defined logic.

Strategy v6
Updated 5 months ago · None stated GitHub repository of Template

Bollinger Squeeze Breakout

by LePotoRico2105
4 stars

Calculates standard Bollinger Bands and identifies volatility contraction when band width drops below a percentage of its moving average. The strategy enters long positions when a confirmed candle closes above the upper band following a recent squeeze, and ent

Strategy v5 Volatility & bandsBreakout
Updated 6 months ago · MIT GitHub repository of Bollinger Squeeze Breakout
4 stars

Christian Qullamaggie Strategy is a trend-following and breakout strategy overlay designed to identify high-momentum trading opportunities directly on the price chart. It evaluates market conditions using fast, mid, and slow EMAs, average true range (ATR), and

Strategy v6 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Christian Qullamaggie Strategy

VAMO Crossover Strategy

by TPTBusiness
4 stars

The VAMO Crossover Strategy is a scalping system that combines momentum and volatility into a Volatility-Adjusted Momentum Oscillator (VAMO). It calculates momentum using Rate of Change divided by ATR and generates trade signals when VAMO crosses its EMA signa

Strategy v6 Oscillators & momentumVolatility & bands
Updated 12 months ago · MIT GitHub repository of VAMO Crossover Strategy
4 stars

This strategy executes trades based on simple moving average crossovers. It calculates a 10-period and a 30-period SMA, opening a long position and closing any short position when the fast SMA crosses above the slow SMA. Conversely, it opens a short position a

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Advanced Buy/Sell Strategy

This strategy executes trades on gold based on a confluence of Supertrend, RSI, MACD, Bollinger Bands, and volume spikes. It enters long or short positions when trend direction aligns with momentum and price positioning relative to volatility bands, filtered b

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of XAUUSD High Probability Strategy
4 stars

This strategy plots three exponential moving averages on the price chart and uses RSI for exits. It opens a long when the fastest EMA crosses above the middle EMA while remaining above the slowest EMA and the bar closes above its open. Shorts use the opposite

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Tendency EMA + RSI [Alorse]

Trix Strategy V2

by CryptoRobotFr
4 stars

This strategy trades trend continuations using a triple moving average oscillator (TRIX) and a long-term moving average baseline. It opens long positions when price is above the long moving average and the TRIX histogram crosses above zero, and opens short pos

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Trix Strategy V2
4 stars

Davids Ichimoku Cloud Break is an overlay strategy that generates trade signals based on Ichimoku Cloud breakout conditions combined with an optional MACD entry filter. It calculates and plots the Conversion Line, Base Line, Lagging Span, and Leading Spans dir

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Davids Ichimoku Cloud Break
4 stars

This strategy executes trend-following trades based on Bollinger Band breakouts confirmed by a long-term moving average filter. A long position opens when the price crosses above the upper Bollinger Band, provided the band spread meets a minimum threshold and

Strategy v5 Volatility & bandsTrend
Updated 2 years ago · None stated GitHub repository of Bollinger Trend - Strategy V1

STPP20 + ADX

by rKv4dr4t
4 stars

This strategy combines a Pivot Point SuperTrend with an Average Directional Index (ADX) filter and a 21-period simple moving average. It enters long positions when the close crosses above the SuperTrend trailing band while remaining above the moving average an

Strategy v4 TrendMoving averages
Updated 2 years ago · MIT GitHub repository of STPP20 + ADX
4 stars

This overlay strategy combines a Supertrend with a k-nearest-neighbors filter. It smooths price and the Supertrend with weighted moving averages, then uses neighbor count and lookback length to form an AI trend signal. Traders can allow long, short, or both di

Strategy v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of AI Volume Supertrend Strategy
4 stars

Calculates a 5-period Exponential Moving Average (EMA) to identify short and long trade setups based on price distance from the average. It triggers entries when price breaks the high or low of an alert candle that formed completely outside the 5 EMA. The stra

Strategy v5 Moving averagesBreakout
Updated 3 years ago · None stated GitHub repository of 5 EMA Strategy: Power of Stocks
4 stars

This strategy plots custom upper and lower bands on the price chart using configurable moving average types and deviation multipliers. It opens long or short positions when price crosses above or below these envelopes, with optional RSI oscillator filters for

Strategy v5 Volatility & bandsMoving averages
Updated 4 years ago · MIT GitHub repository of Bollinger Bands Strategy

ESR-Bot (beta)

by Main-Michael-Sparks
4 stars

ESR-Bot is a Pine v4 strategy that plots in a separate pane. It combines a smoothed RSI, with adjustable overbought and oversold ranges, and two exponential moving averages. A long or short signal fires when RSI sits inside the matching range while a recent EM

Strategy v4 Oscillators & momentumMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of ESR-Bot (beta)

Bigbaldy RSI for DCA

by bigbaldy1128
4 stars

This strategy simulates Dollar Cost Averaging (DCA) trading bot behavior on the chart. It triggers an initial entry when the RSI drops below a specified oversold limit and price is under a maximum price cap. As price falls, it calculates simulated safety order

Strategy v4 Oscillators & momentumMean reversion
Updated 5 years ago · None stated GitHub repository of Bigbaldy RSI for DCA

This strategy plots three EMAs (50, 100, 200) on the price chart for crossover signals. Long entries occur when fast EMA crosses above mid EMA and close exceeds slow EMA; short entries when fast crosses below mid and close is below slow. It uses ATR trailing s

Strategy v4 Moving averagesTrend
Updated 5 years ago · MIT GitHub repository of Algo Trading Simple 3-EMA Strategy + Trailstop

CMYK RMI SMA

by myn
4 stars

CMYK RMI SMA is a multi-period strategy combining three distinct Relative Momentum Index (RMI) oscillators—Alpha, Beta, and Gamma—with Simple Moving Average (SMA) trend filters. It evaluates short, medium, and long-term momentum alongside SMA trend phasing to

Strategy v4 Oscillators & momentumTrend
Updated 6 years ago · Apache-2.0 GitHub repository of CMYK RMI SMA

OPTD ORB Strategy

by drewautomates
3 stars

The OPTD ORB Strategy detects an opening range from a user-defined session window on the chart timeframe. It waits for a specified number of consecutive closes beyond the range high or low on a separate signal timeframe to generate a long or short entry. The d

Strategy v6 BreakoutSessions & time
Updated yesterday · Custom licence GitHub repository of OPTD ORB Strategy
3 stars

This strategy plots Bollinger Bands on the price chart and enters long only when flat. It buys on a strong bullish close above the middle band or on a small-body pullback that tags the middle band with a long lower wick. The stop sits below the signal bar by a

Strategy v5 Volatility & bandsBreakout
Updated 2 days ago · None stated GitHub repository of H4 布林ATR型態多單策略
3 stars

The strategy plots SuperTrend and ADX indicators directly on the price chart. It generates long signals on SuperTrend bullish flips combined with ADX above the set threshold and closes positions on SuperTrend bearish flips or when stop-loss or take-profit leve

Strategy v5 TrendOscillators & momentum
Updated 12 days ago · None stated GitHub repository of OctaStack SuperTrend + ADX
3 stars

This strategy replays historical execution logs exported from TradersPost on the main price chart. It iterates through hardcoded timestamp, direction, price, and quantity arrays generated by an external conversion tool. When the current bar timestamp matches a

Strategy v6
Updated 3 weeks ago · MIT GitHub repository of TradersPost Trade Replay Strategy

Basic Strategy Scaffold

by jpantsjoha
3 stars

This strategy enters long when a fast EMA crosses above a slow EMA and short when it crosses below, only after the bar is confirmed. It sizes each order as a percentage of equity and exits with a percentage stop and a percentage target measured from the averag

Strategy v6 TrendMoving averages
Updated 3 weeks ago · Custom licence GitHub repository of Basic Strategy Scaffold

This strategy combines fractal-based supply and demand order blocks with Awesome Oscillator divergence detection. It generates long signals when price interacts with a demand zone alongside a confirmed bullish divergence, and short signals at supply zones with

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 5 weeks ago · None stated GitHub repository of Combined Strategy - Supply/Demand + AO Divergence
3 stars

This strategy implements a daily Bitcoin trend-following system combining exponential moving averages (EMA 25, 52, and 144) with daily and 4-hour MACD indicators. It triggers long and short positions based on EMA alignments, zero-line momentum segments, and hi

Strategy v5 TrendOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of BTC 1D MACD 回测对比
3 stars

The Buy/Sell Position Strategy combines a long-term Exponential Moving Average (EMA) with a short-term Relative Strength Index (RSI) to capture pullbacks in an uptrend. It enters a long position on the price chart when the price is above the EMA filter and the

Strategy v5 TrendOscillators & momentum
Updated 4 months ago · None stated GitHub repository of Buy/Sell Position Strategy

CryptoSwarmStrategy

by aegntic
3 stars

CryptoSwarmStrategy is a chart overlay strategy that enters long when a fast EMA crosses above a slow EMA, RSI is below the oversold level, and volume exceeds its 20-bar average. It enters short on the opposite EMA cross with RSI above overbought and the same

Strategy v5 Moving averagesOscillators & momentum
Updated 6 months ago · MIT GitHub repository of CryptoSwarmStrategy

GainzAlgo EA

by saadkhan371
3 stars

GainzAlgo EA is a trend-following strategy designed for scalping and intraday trading, optimized for gold and liquid assets. It establishes trend direction using a three-EMA alignment alongside RSI momentum filters and an optional higher-timeframe trend confir

Strategy v5 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of GainzAlgo EA
3 stars

This strategy calculates standard Bollinger Bands and Average True Range to implement a basic mean-reversion system. It opens long positions when price drops below the lower band and short positions when price pierces above the upper band. Open trades are exit

Strategy v5 Mean reversionVolatility & bands
Updated 7 months ago · MIT GitHub repository of Bollinger Band Mean Reversion

DP2

by grinay
3 stars

DP2 is a price-chart strategy that looks for a short dump between the chosen from and to prices, optionally requiring a break of a multi-day low while ignoring moves larger than a dump cap. It can enter through classic, two-close, break-and-retest, ATR-stop, a

Strategy v6 Mean reversionVolatility & bands
Updated 8 months ago · MIT GitHub repository of DP2

Stella's Bollinger Bands

by stella-entry
3 stars

This strategy plots Bollinger Bands on the price chart and trades a long-only mean-reversion idea. It enters when the close is below the lower band, or when the low touches that band if Touch mode is selected, and only while flat. With the opposite-band exit e

Strategy v6 Volatility & bandsMean reversion
Updated 8 months ago · MIT GitHub repository of Stella's Bollinger Bands

Traffic Light Strategy

by Pa1-Tiwari
3 stars

The Traffic Light Strategy is a breakout trading system overlaid on the main price chart. It detects momentum transitions whenever two consecutive candles have opposing colors (bullish followed by bearish, or vice versa). Upon detection, it marks the combined

Strategy v6 BreakoutCandlestick patterns
Updated 10 months ago · MIT GitHub repository of Traffic Light Strategy

Supertrend Strategy

by dharaarpan7
3 stars

This strategy executes long trades based on the Supertrend indicator and candle color confirmation. It enters when a fresh bullish Supertrend flip occurs on a green candle and exits when the trend flips bearish on a red candle. It also places bracket orders wi

Strategy v6 TrendVolatility & bands
Updated 1 year ago · MIT GitHub repository of Supertrend Strategy
3 stars

This strategy plots RSI and Bollinger Bands on the price chart. It calculates the 14-period RSI and 4-period RSI to detect overbought and oversold conditions. The strategy enters short positions when the RSI crosses above 70 and long positions when it falls be

Strategy v4 Oscillators & momentumSupport & resistance
Updated 1 year ago · MIT GitHub repository of RSI Overbought Oversold

Golden Strategy

by AliAhmadi-Software
3 stars

The Golden Strategy is a Pine Script v6 strategy that overlays EMA and SMA on the price chart to detect crossovers for trend direction. It adds MACD for momentum confirmation and RSI to identify overbought and oversold conditions. Volume average filters out lo

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Golden Strategy

This strategy combines volume surge detection, Fibonacci retracements, moving averages, and ATR volatility for trade execution. Long positions trigger when price exceeds the 0.618 Fibonacci level, price stays above a 200-period SMA, a fast EMA crosses above a

Strategy v5 TrendMoving averages
Updated 1 year ago · MIT GitHub repository of Optimized Volume + Fibonacci + Trend + ATR Strategy

200DMA Entry

by FinDeckDao
3 stars

The 200DMA Entry strategy plots the 200-day simple moving average on the price chart. It generates long signals when the close crosses above the 200 MA on the prior bar. Positions are sized at 1 percent of account equity. The strategy exits at a 2.5 times take

Strategy v5 Moving averagesTrend
Updated 1 year ago · MIT GitHub repository of 200DMA Entry
3 stars

This strategy template overlays a demonstration system of Parabolic SAR, regression channels, and Supertrend on the price chart while packaging TV-Hub webhook commands. It generates buy, sell, and close alert messages for selected crypto exchanges. Inputs set

Strategy v5 TrendSupport & resistance Repaints
Updated 2 years ago · MIT GitHub repository of TV-Hub Boilerplate / Template Strategy
3 stars

This strategy opens a long base order and preplaces up to seven limit safety orders below entry, increasing size by a volume scale as price falls. It recalculates an average entry and closes the whole position when price reaches a take-profit percentage above

Strategy v5 Mean reversionSupport & resistance
Updated 2 years ago · Custom licence GitHub repository of Fibonacci Martingale Strategy

This trend-following strategy calculates asymmetric Bollinger Bands and overlays them on the price chart alongside a central moving average. It enters long positions when the price crosses above the upper band, provided an optional benchmark trend filter (chec

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MIT GitHub repository of Bollinger Band Trend Follow Strategy
3 stars

This strategy plots Bollinger bands and a simple moving average on the price chart. It opens a short when price crosses above the upper band while below the average, and a long when price crosses below the lower band while above the average. Entries are allowe

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · None stated GitHub repository of 周末布林带策略

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