Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 61)

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

This strategy plots Bollinger Bands and an exponential moving average on the price chart. It enters long when price touches the lower band above the EMA and a bearish candle is followed by a bullish candle, and enters short on the mirrored upper-band setup. Ex

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands Trending Reverse Strategy

PineForge Cascade MTF Tuple

by pineforge-4pass
1 stars

PineForge Cascade MTF Tuple is a multi-timeframe trend-following strategy designed for price charts. It uses a single security request to retrieve an Exponential Moving Average and Average True Range from a higher timeframe. The strategy plots an entry thresho

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Cascade MTF Tuple

Bollinger Blast Buy

by hasnocool
106 stars

This strategy plots an asymmetric Bollinger envelope on the price chart. The upper band is a simple moving average plus a larger standard-deviation multiple, and the lower band uses a smaller multiple. It enters long when close crosses above the upper band and

Strategy v4 Volatility & bandsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Blast Buy
1 stars

A long-only session strategy that trades inside a configurable time window, 08:00 to 16:00 UTC by default. It enters long at the start of the window or when a 16-period EMA crosses above a 44-period EMA inside it, and closes the position when the window ends.

Strategy v6 Sessions & timeMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Compass Session Market

Bollinger DCA v1

by hasnocool
106 stars

This strategy calculates Bollinger Bands and RSI to trigger dollar-cost averaging buy orders. It enters long positions whenever the closing price dips below the lower Bollinger Band while the RSI is below 50. Order units are calculated dynamically based on a f

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger DCA v1
3 stars

Psychological Levels is a strategy that plots horizontal grid lines based on whole, half, and quarter psychological price levels directly on the chart. It triggers trades during designated intraday session windows, filtering signals using a multi-timeframe mov

Strategy v5 Support & resistanceSessions & time
Updated 5 months ago · None stated GitHub repository of Psychological Levels
1 stars

This strategy identifies severe close-to-close volatility shocks and triggers an immediate exit from any open long position. It enters long when the rate of change of close crosses above a user-defined momentum threshold and the close sits above the trend EMA.

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Flashpoint Immediate Close

Booz Strategy

by hasnocool
106 stars

Booz Strategy is a price-chart strategy that opens longs when a fast EMA crosses above a slow EMA and shorts when it crosses below, provided an optional longer moving-average trend filter agrees. SMA or EMA choices and lengths change the filter and a plotted s

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Booz Strategy

PineForge Gatekeeper Risk Cap

by pineforge-4pass
1 stars

This Pine Script v6 strategy gates long trades to a user-defined session window (default 0900-1700 Asia/Taipei) and enforces a maximum daily filled orders limit. It generates entries solely on fast EMA crossover above the slow EMA while inside the session. Pos

Strategy v6 Sessions & timeMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Gatekeeper Risk Cap

Bottom Catch Strategy

by hasnocool
106 stars

This strategy attempts to capture temporary market dips by identifying high-volume spikes during oversold conditions. It enters a long position when volume exceeds a upper standard deviation channel based on its simple moving average while the RSI remains belo

Strategy v4 Oscillators & momentumVolume
Updated 2 years ago · GPL-3.0 GitHub repository of Bottom Catch Strategy
3 stars

Psychological Levels is a price-chart strategy that draws quarter, half, and whole rounded price levels. A rounding value sets the level spacing, and each level type can be toggled with its own color, line style, and width. Buy and sell volume thresholds, a pr

Strategy v5 Support & resistanceVolume
Updated 5 months ago · None stated GitHub repository of Psychological Levels

PineForge Harbor Stop Limit

by pineforge-4pass
1 stars

A long-only breakout strategy that uses a stop-limit style entry. It tracks the highest high of the previous 35 bars and the range midpoint, and arms an order when the close is above the midpoint but below an activation level set a fraction of ATR above that h

Strategy v6 BreakoutVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Harbor Stop Limit
106 stars

Breakout Trend Follower V2 is a price-chart strategy that enters long when price breaks a recent swing high. It uses the recent swing low as the stop and moves that stop up as higher lows form, exiting when a higher low is breached. Users set the backtest date

Strategy v4 BreakoutTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Follower V2

MC Bias Strategy Example

by regalouisei
2 stars

MC Bias Strategy Example is a Pine Script strategy designed to demonstrate automated trade execution driven by an external Markov Chain bias indicator. The script accepts a user-selected data source to determine directional bias and executes trades based on th

Strategy v5 AI / machine learningTrend
Updated 8 months ago · None stated GitHub repository of MC Bias Strategy Example
1 stars

This strategy calculates a linearly weighted moving average centerline explicitly using a while loop, accompanied by a standard deviation upper band. It enters a long position when the close crosses over the upper band. Exits occur when the price crosses back

Strategy v6 BreakoutVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Heliograph While Channel

Breakout Trend Trading

by hasnocool
106 stars

This strategy trades breakouts, pullbacks, and reversals in the chosen direction on the price chart. Entries can require new long-term highs or lows and recent moving-average alignment, with optional weekly or monthly Supertrend filters. Exits can follow an op

Strategy v4 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Trading
1 stars

A long-only strategy that enters when the close crosses above a 34-period simple moving average. Each trade has an ATR-based protective stop and is closed after a fixed number of bars if still open. Inputs set the average length, hold period, ATR length and st

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Horizon Next-Bar Close
106 stars

This Pine v4 strategy draws on the price chart and filters breakouts with a fixed Supertrend, ATR length, volume moving-average markup, and moving-average alignment, plus short and long high-low periods. Trade direction defaults to long and can include shorts.

Strategy v4 BreakoutTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Trading - V1
3 stars

This strategy trades swing high breakouts on lower timeframes in alignment with higher-timeframe moving average trends. It evaluates price highs using a configurable lookback period and applies higher-timeframe moving average filters along with an optional ATR

Strategy v5 TrendBreakout
Updated 5 months ago · None stated GitHub repository of Qullamaggie Breakout Fixed

PineForge Loopback Method For

by pineforge-4pass
1 stars

The PineForge Loopback Method For is a strategy that calculates an average vote by comparing current close to historical closes across user-defined horizons. It enters a long position when the average vote crosses above a minimum threshold and price exceeds th

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Loopback Method For

BT-5M-1H

by hasnocool
106 stars

BT-5M-1H is a mean-reversion strategy designed for 5-minute charts that simulates 1-hour Bollinger Bands to identify overbought and oversold conditions. It takes positions when price crosses standard deviation multiplier levels and exits using configurable log

Strategy v4 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BT-5M-1H

The Range Percent Breakout Strategy identifies range contraction and inside bar patterns where the current bar's range is within a specified percentage threshold of the previous bar. When this condition is met while flat, breakout levels are established above

Strategy v5 BreakoutVolatility & bands
Updated 5 months ago · None stated GitHub repository of Range Percent Breakout Strategy

PineForge Plumbline PVT VWMA

by pineforge-4pass
1 stars

The strategy calculates a volume-weighted moving average of close prices as the volume-weighted center and a price-volume trend smoothed by EMA as the signal line. It plots the VWMA and PVT distance on the price chart. The strategy enters long positions when p

Strategy v6 TrendVolume
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Plumbline PVT VWMA

BTC 15 min

by hasnocool
106 stars

This strategy combines percentage-based moving average channels, a linear regression curve, and an external timeframe Hull moving average variant to generate trade signals. Buy entries trigger when the linear regression crosses above the smoothed moving averag

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BTC 15 min

This multi-filter strategy triggers intraday entries by combining Relative Strength Index (RSI) range conditions with Volume Weighted Moving Average (VWMA) crossovers, Simple Moving Average (SMA) price alignment, and volume oscillator filters. Users can restri

Strategy v5 Oscillators & momentumMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Rising Bars 30 Sec RSI SMA VWMA Exit Strategy
1 stars

This strategy calculates an ALMA smoothed version of the close price and the correlation between close and volume. It enters long trades when price crosses above ALMA and correlation exceeds the minimum threshold. It exits on price crossing below ALMA, correla

Strategy v6 Moving averagesVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Quarry ALMA Correlation

BTC Bot

by hasnocool
106 stars

BTC Bot is a trading strategy designed for cryptocurrency charts. It calculates Weekly Pivot Points and a smoothed momentum oscillator based on RSI and EMA. Long entries trigger when the oscillator crosses above zero, while short entries trigger when price bre

Strategy v4 Oscillators & momentumSupport & resistance Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of BTC Bot
3 stars

A momentum scalping strategy designed for 5-minute charts that combines the Relative Strength Index (RSI) with fast and slow Simple Moving Averages (SMA). It triggers long entries when the 14-period RSI exceeds 70 while the 5-period SMA is above the 20-period

Strategy v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of RSI MA Scalp Strategy
1 stars

A long-only strategy that plots the prior day's high, low and midpoint on the price chart. It enters long when the close crosses above the prior daily high, provided the prior day's range met a minimum percentage. It closes when price falls below the prior dai

Strategy v6 BreakoutSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Rangefinder Daily Reference
106 stars

This strategy constructs a synthetic Bitcoin price feed by averaging open, high, low, and close data across seven cryptocurrency exchanges. It derives a composite price value using quadratic averaging and plots a volatility envelope around its simple moving av

Strategy v4 Volatility & bandsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of BTC Candle Correlation Strategy
1 stars

This strategy is a request.security parity probe. On a 15-minute chart it reads the 60-minute close with lookahead off and opens one long when that higher-timeframe close changes from the prior bar. It closes the position on the following bar and forces a flat

Strategy v6
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge RS parity 15m to 60m close
106 stars

This strategy plots the RSI of Bitfinex Bitcoin long and short interest in a separate pane and colors a zero line from changes in those series versus short exponential moving averages. It opens a long when the long-interest RSI crosses above the short-interest

Strategy v4 Oscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of BTC Sentiment analysis RSI
1 stars

This strategy plots a fast and a slow exponential moving average on the price chart. It enters long and closes any short when the fast average crosses above the slow average, and enters short and closes any long when the fast average crosses below the slow ave

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Switchback All-In Reversal

This strategy plots a moving average with a range band on the price chart and places stop entries when the source crosses the upper or lower band. Long and short orders are cancelled if price returns through the average or reaches the stored stop price. Option

Strategy v4 Moving averagesVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Built-in Kelly ratio for position sizing

ScarAlgo v1

by g-moe
3 stars

ScarAlgo v1 is a trend-following and market-structure strategy plotted directly on the main price chart. It triggers entries using an ATR-based trailing envelope filtered by a configurable multi-timeframe moving average, while employing a WaveTrend momentum os

Strategy v5 TrendSMC / ICT / price action
Updated 5 months ago · None stated GitHub repository of ScarAlgo v1
1 stars

A long-only strategy that enters when a 19-period EMA crosses above a 58-period EMA. Half of the position is closed by a market order once price reaches an ATR multiple above the average entry. The rest is closed when the EMAs cross back down or when the close

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Tranche Partial Market Close

Bulle de bollinger

by hasnocool
106 stars

Bulle de bollinger is a price-chart strategy that plots a 20-period simple moving average and two-standard-deviation Bollinger bands, with a fill between the bands. It enters long when the prior bar's open and close are below the lower band, and short when the

Strategy v4 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of Bulle de bollinger

This strategy draws up to three session range boxes and optional backgrounds on the price chart. It records each session high and low, then looks for a breakout during a later trading window after a set number of candles close outside the range. Entries can be

Strategy v5 Sessions & timeBreakout
Updated 5 months ago · None stated GitHub repository of Session Breakout Box Strategy

PineForge Vector Stop Breakout

by pineforge-4pass
1 stars

A long-only breakout strategy that waits for volatility contraction, defined as ATR falling below a set fraction of its own moving average. While that holds, it arms a buy stop just above the highest high of the prior 28 bars, plus a small ATR buffer, and canc

Strategy v6 BreakoutVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Vector Stop Breakout

Bulle de Bollinger

by hasnocool
106 stars

The script plots the SMA middle band along with Bollinger upper and lower bands with two standard deviations, filling the area between them on the price chart. It signals long entries on a close crossing above the lower band after the previous bar was below it

Strategy v4 Moving averagesVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Bulle de Bollinger
1 stars

This strategy overlays a fast and a slow exponential moving average on the price chart and treats their crossovers as entries. It opens a long position when the fast average crosses above the slow average and, when shorts are allowed, opens a short on the oppo

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Aurora Market Bracket

Buurmans Tutorial

by hasnocool
106 stars

This educational strategy executes trades based on specific days of the week, entering long on a chosen weekday (Monday, Tuesday, or Wednesday) and closing or reversing to short on Friday. It plots dynamic stop loss and take profit price levels directly on the

Strategy v4 Sessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of Buurmans Tutorial
1 stars

This session-based strategy triggers long entries at the start of the New York trading session when trend and momentum conditions align. It calculates a 38-period Exponential Moving Average and a 14-period RSI. A long position is taken at session open if the c

Strategy v6 Sessions & timeTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Borough New York Session
106 stars

This strategy holds a long position between user-defined start and end dates. It enters long with the full equity while the chart time is inside that window and closes the position when time falls outside it. Day, month, and year inputs set both boundaries. It

Strategy v4
Updated 2 years ago · GPL-3.0 GitHub repository of Buy and hold calculator

Session Wicks

by g-moe
3 stars

This strategy executes long and short trades on the price chart by combining multi-timeframe smoothed Heikin-Ashi trends, higher-timeframe Hull Moving Average variations, and an ATR-based trailing stop. Users can adjust timeframes, smoothing lengths, Hull form

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Session Wicks
1 stars

The Cadence Matrix Pairing strategy calculates price direction changes and volume confirmation across short, medium, and long horizons using close comparisons and simple moving averages of volume. It assembles these binary votes into a transposed matrix and ta

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Cadence Matrix Pairing
106 stars

This strategy searches for long buy-and-hold entries on the price chart. It calculates a user-length EMA and a fixed 12/26 MACD, then opens a long position when price is within the maximum EMA distance, that distance is not shrinking, MACD is at or below zero,

Strategy v4 Moving averagesOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Buy and Hold entry finder Strategy

Session Wicks

by g-moe
3 stars

This strategy calculates smoothed Heikin-Ashi candles alongside a moving average of the Relative Strength Index to enter trend reversals. It triggers long entries when smoothed Heikin-Ashi turns bullish while RSI trades above its moving average, and short entr

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Session Wicks

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