Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 48)

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 that builds an opening range from 09:30 to 09:45 New York time and enters long or short on the first close beyond it each day. The position is split across three take profit targets set as risk multiples, with adjustable percentages. The stop sits a

Strategy v5 Sessions & timeBreakout
Updated 8 days ago · GPL-3.0 GitHub repository of 15-Min ORB Strategy for NQ TP3 Runner

TN OR Magnet

by raybird
1 stars

An opening range strategy for the New York session that records the high and low of a short opening window, then trades retests of that range. Setup A follows drift from the range with a retest, and a conservative Setup B uses breakout plus retest. Filters ski

Strategy v6 Sessions & timeBreakout
Updated 2 months ago · None stated GitHub repository of TN OR Magnet

UNI BTC Binance 1m

by tseitz
1 stars

A Pine v4 strategy that plots a session VWAP with an upper and lower band offset by a percentage of the high and low. A long starts on a green candle opening above VWAP and a short on a red candle opening below it. A long closes when the high reaches the upper

Strategy v4 VolumeScalping
Updated 4 years ago · None stated GitHub repository of UNI BTC Binance 1m

Pin Bar Magic v1

by Alorse
330 stars

This strategy trades price action pin bar patterns aligned with moving average trend alignment on the main price chart. It defines uptrends or downtrends using a fan arrangement of three moving averages (6 EMA, 18 EMA, and 50 SMA). Entry conditions require a b

Strategy v4 Candlestick patternsTrend
Updated 2 months ago · None stated GitHub repository of Pin Bar Magic v1

BB Strategy tooba

by hasnocool
106 stars

This strategy executes trades based on Bollinger Band crossovers on the price chart. It calculates a simple moving average basis along with standard deviation bands. When the closing price crosses above the lower band, it places a long stop order, and when pri

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of BB Strategy tooba

Currency test

by be-thomas
65 stars

This strategy sets the account currency to euros and, after the year 2020, opens a long position of one thousand units. It exits that position with a one-point profit target and a one-point stop. It plots the absolute bar-to-bar change in net profit, scaled by

Strategy v4
Updated 6 days ago · GPL-3.0 GitHub repository of Currency test

InSide Bar Strategy

by TWODS-CAPITAL
37 stars

This strategy detects an inside bar when the current high is below the previous high and the current low is above the previous low. It enters long when that bar's close is above its open and short when the close is below its open. Signals are placed on the pri

Strategy v5 Candlestick patterns Repaints
Updated 3 years ago · MIT GitHub repository of InSide Bar Strategy
13 stars

This strategy automates the TradingLatino methodology by evaluating Squeeze Momentum combined with the Average Directional Index (ADX). It executes long or short positions based on momentum shifts and directional strength. Risk management options include const

Strategy v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Ruckard Lupown TradingLatino A002

PF IES probe 06 - pivot sweep

by pineforge-4pass
1 stars

This Pine Script strategy detects pivot liquidity sweeps on the price chart. It identifies swing highs and lows using ta.pivothigh and ta.pivotlow with user-defined left and right bar counts. The script maintains state for the last confirmed pivot and flags a

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 7 days ago · Apache-2.0 GitHub repository of PF IES probe 06 - pivot sweep
1 stars

This strategy plots a Vegas-style exponential moving average tunnel on the price chart, plus a 12-period EMA, a 240-period SMA, and Bollinger Bands. It also computes a MACD difference from 48- and 56-period EMAs. Long entries open on tunnel-average crosses or

Strategy v4 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Vegas Tunnel strategy
1 stars

A Pine v4 strategy that plots a 13-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of UNIBTC EMA Cross Strategy

BB%B Strat

by hasnocool
106 stars

This strategy trades mean-reversion setups using the Bollinger Bands Percent Bandwidth (%B) oscillator plotted in a separate pane. It calculates upper and lower bands using a simple moving average and standard deviation multiplier. Long positions are entered w

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of BB%B Strat
13 stars

This strategy calculates the Volume Zone Oscillator (VZO) alongside volume spikes to detect directional momentum. It enters long positions when the VZO turns bullish accompanied by a volume spike, and enters short when the VZO turns bearish with elevated volum

Strategy v5 VolumeOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard Neobutane VZO bA002
1 stars

This strategy enters long when a fast EMA crosses above a slow EMA, the position is flat, a cooldown bar count has elapsed, and the day's trade count is below a cap. It closes that long when the fast EMA crosses back under the slow EMA. Inputs set both EMA len

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF IES probe 07 - cooldown + daily cap

Uniswap MACD

by tseitz
1 stars

A long-only strategy drawn on the price chart that buys when the MACD line (12 and 26 period EMA difference) crosses above its 9 period SMA signal line and closes the position when it crosses back below. Trading is limited to a window of recent days set by two

Strategy v4 Oscillators & momentum Repaints
Updated 4 years ago · None stated GitHub repository of Uniswap MACD

BBPullback

by hasnocool
106 stars

This strategy executes pullback trades based on internally computed Bollinger Bands and candle price action directly on the main price chart. It tracks breakout and pullback states to trigger long and short entries. Users can select among three distinct take p

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of BBPullback
13 stars

This strategy calculates a Volume Zone Oscillator and plots it in a separate pane. It goes long when the oscillator shows green and a volume spike occurs, and goes short when it shows red with a volume spike. A reverse mode and optional start and stop times co

Strategy v5 Oscillators & momentumVolume
Updated 1 year ago · None stated GitHub repository of Ruckard Neobutane VZO cB003

PF IES Probe 08 - Equity Sizing

by pineforge-4pass
1 stars

PF IES Probe 08 is a strategy designed to evaluate equity-feedback dynamic position sizing logic. It determines market regimes using the Average Directional Index to scale position size dynamically based on current strategy equity, user-defined risk percentage

Strategy v6 TrendVolatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of PF IES Probe 08 - Equity Sizing
1 stars

A template version of a long-only MACD strategy for Pine v4 in which the script name and take-profit percentage are unfilled placeholders, so it will not compile until they are replaced. The logic uses a 12/26 MACD with a nine-period signal, requires three ris

Strategy v4 Oscillators & momentum Repaints
Updated 4 years ago · None stated GitHub repository of Uniswap MACD Strategy Template
106 stars

BEAM DCA Strategy Monthly calculates long-term risk bands around a moving average baseline to implement a monthly dollar-cost averaging strategy. It normalizes asset risk between 0 and 1, placing buy orders when risk falls below 0.5 on a specific day of the mo

Strategy v5 Moving averagesSupport & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of BEAM DCA Strategy Monthly

Keltner Channels Strategy

by TWODS-CAPITAL
37 stars

This strategy builds Keltner-style bands around an exponential or simple moving average of the chosen source. Band width uses average true range, raw true range, or a smoothed high-low range, scaled by a multiplier. When the source crosses above the upper band

Strategy v5 Volatility & bandsBreakout
Updated 3 years ago · MIT GitHub repository of Keltner Channels Strategy
13 stars

This strategy plots a Noro trend ribbon on the price chart and uses ribbon side changes to choose long or short direction. A corridor built from recent high and low prices filters entries: longs open below the corridor while the bias is long, and shorts open a

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon

NQ 9:45-10:15 ICT Strategy

by eddiebelaval
7 stars

This ICT-based strategy trades during the 9:45 AM to 10:15 AM New York session window. It calculates a daily bias using a 20-period daily EMA and tracks previous day highs and lows to identify liquidity sweeps. The script refines order block entry levels and m

Strategy v6 SMC / ICT / price actionSessions & time Repaints
Updated 3 months ago · None stated GitHub repository of NQ 9:45-10:15 ICT Strategy

PF IES Probe 09 - Integration

by pineforge-4pass
1 stars

PF IES Probe 09 - Integration is a multi-layered quantitative strategy designed to test interaction among market regime, trend bias, momentum, and price pressure. It computes an ADX and ATR volatility regime, a multi-EMA trend bias score, an RSI and MACD momen

Strategy v6 TrendOscillators & momentum
Updated 7 days ago · Apache-2.0 GitHub repository of PF IES Probe 09 - Integration
1 stars

This strategy evaluates market structure, volume spikes, and smart money concepts such as order blocks and fair value gaps to score trade entries. It triggers orders when signals meet a minimum confidence threshold and comply with session killzones. Positions

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TN PropFirm Ultra [TeleNexus]
1 stars

A long-only strategy on the price chart built around a short simple moving average, 5 bars by default. It buys when a green candle opens above the average and sells when a red candle crosses below it. After entry, a stop order is placed at a percentage below t

Strategy v4 Moving averages
Updated 4 years ago · None stated GitHub repository of Uniswap SMA Strategy

GetTrend Strategy

by capissimo
114 stars

GetTrend Strategy plots a higher-timeframe open and close on the price chart and treats their crossover as a directional signal. A long entry fires when the higher-timeframe close crosses above the open, and a short entry fires on the opposite cross. Optional

Strategy v4 Trend Repaints
Updated 1 year ago · None stated GitHub repository of GetTrend Strategy

This strategy script provides a framework for backtesting custom trading rules with flexible risk and order management. It allows traders to configure fixed pip-based stop loss, take profit, and trailing stop levels, complete with custom partial exit percentag

Strategy v5
Updated 2 years ago · GPL-3.0 GitHub repository of BEST Strategy Template with Custom SL-TP Size
13 stars

This strategy draws trend ribbons and price corridors directly on the price chart using configurable moving averages of highs, lows, and closes. It identifies trend direction from ribbon state changes and generates long entries when price drops below the corri

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon
3 stars

The Grid Bot Simulator strategy models automated grid trading directly on the price chart. It divides a user-specified price channel between upper and lower bounds into equal grid intervals. Depending on the chosen market direction filter, the strategy execute

Strategy v5 Support & resistanceMoving averages
Updated 5 months ago · None stated GitHub repository of Grid Bot Simulator
1 stars

This Pine Script strategy overlays two exponential moving averages on the price chart. It generates buy signals when the fast EMA crosses above the slow EMA and the tick counter is divisible by the step value. It generates sell signals on the opposite cross un

Strategy v6 Oscillators & momentumMoving averages Repaints
Updated 7 days ago · Apache-2.0 GitHub repository of PF kanuck-probe-02-calc-on-every-tick
1 stars

TN Sentiment Macro Sovereign is a trend-following strategy that combines technical moving average crossovers with external macro sentiment data. It calculates 12-period and 26-period Exponential Moving Averages alongside a smoothed sentiment metric fetched via

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sentiment Macro Sovereign
1 stars

A Pine v4 strategy that plots a 41-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of XLMBTC EMA Cross Strategy
330 stars

This strategy implements a trend-following execution model based on the classic Supertrend indicator. When the ATR-derived Supertrend flips to a bullish state, the strategy opens a long position. The initial stop loss is determined by the lowest price over a u

Strategy v4 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Supertrend [Alorse]
106 stars

This overlay strategy plots a short Bollinger Band and enters long when the close crosses above the lower band while a 14-period SMA is above a 42-period SMA. It enters short when the close crosses below that lower band while the faster SMA is below the slower

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Best TradingView Strategy
13 stars

This strategy plots a trend ribbon and colored background on the price chart using moving averages calculated across price highs and lows. It generates trade signals to automate orders through Zignaly webhooks or email alerts. Users can configure the moving av

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon
1 stars

This strategy uses lower-timeframe data to probe numeric array reductions in Pine Script. On a 15-minute chart it fetches 15 one-minute closes using request.security_lower_tf and sums them to create a synthetic intra-bar momentum. It plots EMAs on the price ch

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF lower-tf probe 01 - float ratio15
1 stars

A Pine v4 strategy that plots a 36-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of XMRBTC EMA Cross Strategy

This strategy builds upon the Big Snapper system by combining trend-following moving averages, Chaikin Volatility, and volume filtering to generate trade signals directly on the main chart. Long and short entries trigger when Snapper signals align with medium

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Big Snapper Chaiking Volatility + TP RSI
13 stars

This strategy uses Noro TrendRibbon direction changes to decide long or short bias. It builds a corridor from recent high and low prices, opening a long below that corridor while longing and a short above it while shorting, with the entry tied to a percentage

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon

This strategy identifies reversal opportunities based on liquidity sweeps and multi-gate confluence scoring. It evaluates setups using mandatory conditions such as swing sweeps, body and ATR filters, and dual EMA higher-timeframe trend alignment, alongside opt

Strategy v6 SMC / ICT / price actionTrend
Updated 3 days ago · MIT GitHub repository of Reversal Engine Score [WavesUnchained] 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