Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 7)

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

1 stars

A strategy for index charts such as the S&P 500 on five minutes, trading only inside a configurable New York time window. It looks for a large-bodied candle, measured against ATR, that follows a short-term liquidity sweep of recent highs or lows, with an optio

Strategy v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Gemini ICT V11 Extended Dashboard
1 stars

This strategy identifies the Initial Balance (IB) high and low during a user-defined opening session and trades breakout pullbacks. Once the IB window concludes and range filters are satisfied, it enters long or short when price breaks out and retraces back to

Strategy v6 BreakoutSessions & time
Updated 7 months ago · MIT GitHub repository of Gold IB Breakout Retracement

This strategy detects low-volatility consolidation by identifying when Bollinger Bands contract inside Keltner Channels. When the squeeze releases, it evaluates linear regression momentum and optional volume spikes to confirm breakouts. Long signals occur on r

Strategy v5 Volatility & bandsBreakout
Updated 7 months ago · None stated GitHub repository of Bollinger Band Squeeze - Volatility Breakout

ICT iFVG Continuation Engine

by kashifali1234a12-beep
1 stars

A strategy that tracks fair value gaps on a higher timeframe, 15 minutes by default, and watches for price to tap a zone and then invert a one-minute fair value gap before entering. It trades only inside a set session window, limits trades per day, and can opt

Strategy v5 SMC / ICT / price actionSessions & time
Updated 8 months ago · None stated GitHub repository of ICT iFVG Continuation Engine

ICT 2022 Pure Mentorship

by cKm-IceCold
1 stars

A strategy that models an ICT-style sequence: it detects a liquidity sweep of a one-hour swing level, then waits for a market structure shift on the chart timeframe confirmed by a large displacement candle. Signals are limited to configurable London, New York

Strategy v6 SMC / ICT / price actionSessions & time Repaints
Updated 8 months ago · None stated GitHub repository of ICT 2022 Pure Mentorship
1 stars

A template file of simple Pine strategy examples, led by an EMA crossover that goes long when a 10-bar EMA crosses above a 20-bar EMA and short on the reverse. Other templates in the file show ATR-based stop loss and take profit, an RSI overbought and oversold

Strategy v6 Moving averagesTrend Repaints
Updated 8 months ago · None stated GitHub repository of EMA Crossover Template
1 stars

A Pine v5 strategy that classifies the market as volatile, trending or ranging using ATR against its history and ADX thresholds. In trending conditions it trades a 9 and 20 EMA crossover, and in ranging conditions it fades Bollinger Band extremes. Stops and ta

Strategy v5 TrendMean reversion
Updated 8 months ago · None stated GitHub repository of APSAlgo Adaptive Pattern System

Mean Reversion Trading Bot

by BenjaminLettner
1 stars

This strategy executes mean-reversion trades by combining RSI momentum, Bollinger Bands volatility, dynamic ATR stops, and Exponential Moving Averages for trend filtering. It seeks entry opportunities when price reaches extreme Bollinger Band boundaries alongs

Strategy v5 Mean reversionOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Mean Reversion Trading Bot
1 stars

A Pine v5 long-only strategy that switches behavior with an ADX trend reading. When ADX is above the threshold it buys on a fast EMA crossing above a slow EMA, and when ADX is below it buys on RSI under 30. It closes the long on the opposite EMA cross in trend

Strategy v5 TrendMean reversion
Updated 8 months ago · None stated GitHub repository of AU Adaptive Regime Switch

Backtest Example

by propuchon
1 stars

A course example strategy that buys when a fast EMA crosses above a slow EMA and then manages the trade with a percentage stop loss and take profit measured from the average entry price. Only long trades are opened; the short condition is calculated but not us

Strategy v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Backtest Example
1 stars

A long-only strategy generated from the TrendLab research project, drawn on the price chart. It tracks the highest high over a 115-bar lookback. It buys when the close is at or above 70 percent of that high and sells when the close falls below 52 percent of it

Strategy v6 TrendBreakout
Updated 9 months ago · MIT GitHub repository of 52-Week High 115/70/52

SmaCross Strategy

by SimonLai-28198
1 stars

A long-only strategy that buys when a short simple moving average crosses above a long one and closes the position when it crosses back below. Defaults are 10 and 50 bars, both adjustable. It draws both averages and buy and sell triangles on the price chart, e

Strategy v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of SmaCross Strategy

ES Professional Fade

by knectardev
1 stars

An ES futures fade strategy designed to trade market opening gaps during regular trading hours. It calculates opening gaps using percentage, point, and ATR thresholds while employing a market breadth TICK filter to veto trades on trend days. It features an exe

Strategy v6 Sessions & timeMean reversion
Updated 9 months ago · None stated GitHub repository of ES Professional Fade

Donchian Breakout + ATR Risk

by JustACoder279
1 stars

A trend-following strategy that goes long when the close breaks above the previous Donchian channel high and short when it breaks below the previous low. An optional 200 EMA filter limits direction, and an ATR regime filter skips quiet markets. Each trade has

Strategy v5 BreakoutTrend Repaints
Updated 9 months ago · MIT GitHub repository of Donchian Breakout + ATR Risk
1 stars

This mean-reversion strategy identifies deep price drops following a multi-bar low, such as a 52-week low. It calculates a target threshold located a specified percentage below the period low and triggers a buy entry when price plunges to this oversold level.

Strategy v6 Mean reversionSupport & resistance
Updated 9 months ago · MIT GitHub repository of Super Oversold (52 Week Low Version)

This strategy automatically adapts its moving average lengths and types based on the chart's timeframe, covering scalping, intraday, and swing styles. It generates entry signals when a fast moving average crosses a slow moving average, provided price is on the

Strategy v6 TrendMoving averages
Updated 10 months ago · MIT GitHub repository of EMA / SMA Crossover + ADX + EMA100 Trend Filter
1 stars

This overlay strategy requires sequential confluence before it enters. A hybrid detector blends selected oscillators, including RSI, CCI, MFI, Bollinger percent B and Keltner percent K, and treats extreme overbought or oversold readings as the market regime. V

Strategy v6 Oscillators & momentumVolatility & bands
Updated 10 months ago · None stated GitHub repository of Stratégie Confluence Hybride-VMCB
1 stars

This strategy uses a fast and a slow simple moving average with the bar's price range. In its default long-only mode it buys when price sits below the fast average, in the lower part of the bar range, while staying above the slow average, and exits when price

Strategy v6 Mean reversionMoving averages
Updated 10 months ago · None stated GitHub repository of Mean Reversion Pro Strategy
1 stars

A trend-following strategy that goes long when the fast EMA is above the slow EMA, RSI is above its threshold and the MACD histogram is positive, and goes short on the opposite conditions. An optional filter requires the close to sit beyond both EMAs. When ena

Strategy v6 TrendOscillators & momentum
Updated 11 months ago · None stated GitHub repository of Hybrid EMA+RSI+MACD Strategy

This strategy plots Supertrend on the price chart and enters long only when the one-hour Bitcoin Supertrend is bullish, the symbol Supertrend is bullish, price is above the line, and the bar makes a higher high. It sizes each trade at 100 percent of equity and

Strategy v5 TrendBreakout Repaints

Hybrid Pro Strategy

by bdrnjom007
1 stars

A Pine v5 strategy, with Arabic input labels, that counts bullish signals from several groups: Turtle-style breakouts, RSI and Bollinger Band mean reversion, EMA, MACD and ADX momentum, plus order blocks, fair value gaps and supply and demand zones. It enters

Strategy v5 BreakoutMean reversion
Updated 11 months ago · None stated GitHub repository of Hybrid Pro Strategy

ichiV1 Freqtrade Mirror

by ChiChasesCheese
1 stars

A long-only strategy that ports a Freqtrade bot to TradingView. It builds Heikin-Ashi values, a ladder of EMAs standing in for several timeframes, a fan magnitude ratio and an Ichimoku-style cloud from Donchian midpoints. Entries need price above the cloud, a

Strategy v6 Trend Repaints
Updated 12 months ago · None stated GitHub repository of ichiV1 Freqtrade Mirror

Modified Asia Sweep

by HibrowSamuvelChristin
1 stars

Modified Asia Sweep is a futures strategy sample built around the Asian and London sessions, with session hours and time zone as inputs. It draws session ranges, Asian swing points, market structure and break of structure lines. Position size can be set by a f

Strategy v5 Sessions & timeSMC / ICT / price action
Updated 1 year ago · Custom licence GitHub repository of Modified Asia Sweep

Strategy Version 1.2

by HypertextAssassin69
1 stars

A long strategy built on a 50-period Hull moving average crossing a 200-period EMA, with ADX strength, a short Hull slope and an optional RSI filter used to scale entry size in steps. It uses an ATR stop that tightens after a drawdown, staged profit-lock parti

Strategy v6 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Strategy Version 1.2

Cuan Bungkus

by mamuncloud
1 stars

A long-only strategy for stocks that buys when the close is above a 5-period EMA, the short EMA is above a 20-period EMA, and volume exceeds a multiple of its 20-bar average. Position size is a set percent of initial capital. After entry it places a fixed perc

Strategy v6 Moving averagesVolume
Updated 1 year ago · None stated GitHub repository of Cuan Bungkus
1 stars

This strategy combines Exponential Moving Averages, the Relative Strength Index, and Average True Range with optional multi-timeframe confirmation to generate trade signals. Long trades trigger on fast EMA bullish crossovers when RSI is low, while short trades

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Demo Advanced Strategy v6

MR First Entry Backtester

by gaurav4ever
1 stars

A strategy for 5-minute charts that builds a morning range of either five or fifteen minutes after the market open and takes the first breakout entry, with an entry buffer in ticks. An optional trend filter buys only above and sells only below the 50 EMA, and

Strategy v5 BreakoutSessions & time
Updated 1 year ago · None stated GitHub repository of MR First Entry Backtester

ORB Fresh v3

by abhidp
1 stars

Opening range breakout strategy on the price chart. It measures the high and low of a configurable opening window, 09:30 to 09:45 by default, ignores ranges below a minimum point size, and trades breakouts of that range. Position size is based on a risk percen

Strategy v6 BreakoutSessions & time
Updated 1 year ago · None stated GitHub repository of ORB Fresh v3

A breakout strategy built for S50 futures on a 30-minute chart. It tracks confirmed swing highs and lows from pivot detection and places stop-order entries when price breaks the latest swing level. The stop sits one ATR beyond the opposite swing, the target is

Strategy v6 BreakoutSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of S50 TFEX Trend Following Breakout

A strategy written for a 15-minute TRUMP perpetual swap chart. When a candle's high-to-low range exceeds a percentage threshold, it places a limit order against the candle's direction, short after a green candle and long after a red one, at a price between the

Strategy v6 Mean reversionVolatility & bands
Updated 1 year ago · None stated GitHub repository of TRUMP 15m Large Range Reversal v1

My BTC Investment Strategy

by CodingExplored
1 stars

A long-biased strategy that compares two selectable trend lines (TEMA, LSMA, EMA or SMA) and enters when the fast line crosses above the slow one while an ATR trailing level sits below price. It exits when price drops under the trailing high, when the lines cr

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of My BTC Investment Strategy

Ultimate Crypto Bot

by dextergocode
1 stars

This Pine Script strategy is designed for cryptocurrency trading on TradingView. It combines moving averages, RSI, MACD, Bollinger Bands, Stochastic oscillator and volume analysis to generate buy and sell signals. Higher time frame trend confirmation and marke

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · MPL-2.0 GitHub repository of Ultimate Crypto Bot

Adaptive SuperTrend Strategy

by yagyesh-bobde
1 stars

The Adaptive SuperTrend Strategy is a custom trading strategy that calculates an adaptive SuperTrend value using volatility-adjusted factors. It determines high or low volatility by comparing ATR to its 100-period SMA and adjusts the SuperTrend factor accordin

Strategy v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Adaptive SuperTrend Strategy

AAPL Best Position

by theteelek
1 stars

A long-only strategy that accumulates a fixed quantity by buying near the lower edge of a smoothed channel. The channel is an EMA of the highest high and lowest low over an adjustable range. A buy fires when price touches the lower line while RSI is rising out

Strategy v6 Mean reversion
Updated 1 year ago · None stated GitHub repository of AAPL Best Position

Adaptive Strategy

by Studentcodee
1 stars

This adaptive strategy combines multiple classic technical indicators into a unified framework to generate trading signals on the price chart. It evaluates conditions across Moving Average crossovers, Donchian channel breakouts, MACD, RSI, Bollinger Bands, Par

Strategy v6 TrendOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Adaptive Strategy
1 stars

A strategy meant for one-minute charts that buys when price is near a recent pivot low, RSI is below an oversold level, a hammer or bullish engulfing candle appears and price is above an EMA. Sells mirror this near pivot highs with overbought RSI, bearish patt

Strategy v6 Candlestick patternsSupport & resistance

EA

by equitymarkets
1 stars

This Pine Script strategy provides a basic moving average crossover trading template. It calculates and plots a fast simple moving average and a slow simple moving average directly on the price chart. The strategy enters a long position when the fast average c

Strategy v6 Moving averagesTrend
Updated 1 year ago · MIT GitHub repository of EA

Supertrend Strategy

by meetghodasara
1 stars

A long-only strategy built on the built-in Supertrend indicator. It enters long when Supertrend flips to an uptrend and closes the position when it flips back to a downtrend, with orders processed on bar close. ATR length and factor are adjustable. Green and r

Strategy v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Supertrend Strategy

A pivot breakout strategy for the S50 futures on a 30-minute chart. Swing highs and lows are found from left and right bar counts, with stop entries placed beyond them. Each entry has an exit order with a stop one ATR past the pivot and a limit set by a risk t

Strategy v6 BreakoutSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of S50 TFEX Strategy LeftBar RightBar

ETHBTC MTPI V2.0

by Mikelkulla
1 stars

This strategy detects whether Ethereum outperforms Bitcoin relative to the overall market using MTPI signals. It combines outputs from DEMA Adaptive Fractal Range, DEMA Supertrend, Schaff Trend Cycle, RMI Trend Sniper, and FDI-Adaptive Supertrend indicators. L

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ETHBTC MTPI V2.0
1 stars

A small test strategy used to exercise a browser automation project rather than to trade. It goes long when a 14-period simple moving average crosses above a 28-period one and short on the opposite cross, with no stop loss or take profit. It also defines sampl

Strategy v6 Moving averages
Updated 1 year ago · None stated GitHub repository of Automation Tests Strategy Script
1 stars

This strategy plots several exponential moving averages and an optional VWAP on the price chart. It defines a long setup when the short EMA crosses above the long EMA, price is above the short EMA, and, if enabled, above VWAP. A short setup uses the opposite c

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of EMA Crossover Strategy

ADX Trend Strategy

by pcjtse
1 stars

This strategy goes long when ADX is above a threshold and price crosses above a 20-period simple moving average, and goes short on the opposite cross. Each entry carries an ATR-based stop loss and take profit, set by two multipliers. Orders use all available e

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of ADX Trend Strategy
1 stars

A strategy built on two Donchian midlines, one long and one short, plus an ATR readout. It enters long when price has crossed above the long line and the short line has crossed above the long line, in either order, and enters short on the mirror pair of crosse

Strategy v5 TrendBreakout
Updated 1 year ago · None stated GitHub repository of Ardakani Dual Condition Strategy
1 stars

This strategy trades long or short on the chart. It takes a long entry when a fast EMA is above a slow EMA, MACD is above its signal line, ADX is above a threshold and price is above VWAP, or when price breaks above a pivot high; shorts mirror this. Each trade

Strategy v5 TrendBreakout
Updated 1 year ago · None stated GitHub repository of AI-Optimized Trading Strategy
1 stars

A strategy template that sets up Bollinger Bands, MACD and an RSI with its own Bollinger band, each with adjustable lengths, and uses a share of equity for sizing. Orders carry a percentage stop loss and take profit, defaulting to 3 and 30. The condition secti

Strategy v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Boll MACD RSI 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