Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 57)

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 basic Supertrend strategy with an optional volume filter, drawn on the price chart. The Supertrend line is calculated from ATR length and multiplier. A long or short entry is taken in the trend direction when volume exceeds a multiple of its moving average,

Strategy v6 TrendVolume
Updated 2 months ago · None stated GitHub repository of TnSovereign Supertrend Volume

This strategy calculates and plots smoothed Heikin-Ashi candles directly onto the main price chart using exponential moving averages of open, high, low, and close prices. It enters a long position after three consecutive bullish smoothed candles with sequentia

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Abdoli's Heikin Ashi Smoothed Buy & Sell Strategy Rev.4

UnfairValueGap B003

by ruckard
13 stars

This strategy calculates the distance between the current price and the opposite end of a recent price gap. It trades against gap completion under the assumption that price will resume the prevailing trend after a partial gap fill. Take profit and stop loss va

Strategy v5 SMC / ICT / price actionMoving averages
Updated 1 year ago · None stated GitHub repository of UnfairValueGap B003

PF Probe 98 - Inside-Bar Engulf

by pineforge-4pass
1 stars

PF Probe 98 - Inside-Bar Engulf is a strategy that detects single-bar inside range patterns paired with candle direction filters. It identifies inside bars where the high is lower than the previous high and the low is higher than the previous low. A long entry

Strategy v6 Candlestick patterns
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe 98 - Inside-Bar Engulf

A breakout strategy that scores setups from 0 to 100 using a trend template of stacked moving averages, a volatility contraction check, a squeeze test with Bollinger and Keltner bands, and volume flow. A custom free energy versus fractal entropy measure acts a

Strategy v6 BreakoutVolatility & bands
Updated 2 months ago · None stated GitHub repository of TnSovereign Thermodynamic Breakout

ABU Euroramp

by hasnocool
106 stars

This strategy executes a time-based long entry at 02:00 exchange time, targeted around the European market open. It opens a position of two units and applies fixed-point profit and risk management. If price drops five points below the entry, a full stop loss t

Strategy v4 Sessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of ABU Euroramp
13 stars

This strategy provides a moving average crossover system combined with Zignaly crypto platform alert integration and built-in risk management. It enters long positions when a 14-period simple moving average crosses above a 28-period SMA, and enters short posit

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Zignaly Risk M. A079
1 stars

This strategy calculates Keltner Channels using an Exponential Moving Average (EMA) for the midline and Average True Range (ATR) scaled by a multiplier for band width. It triggers a long entry when the close price crosses above the upper band and a short entry

Strategy v6 TrendVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe 99 - Keltner Channel Break

A volatility squeeze strategy on the price chart. It detects when Bollinger Bands contract inside Keltner Channels, then waits for the squeeze to release. A long or short entry is considered when price closes outside the band on release and a custom free energ

Strategy v6 Volatility & bandsBreakout
Updated 2 months ago · None stated GitHub repository of TnSovereign Thermodynamic Squeeze
106 stars

This strategy calculates weighted composite scores by evaluating conditions from multiple technical indicators, including EMAs, Supertrend, Parabolic SAR, HMA, RSI, MACD, WaveTrend, Stochastic, Bollinger Bands, and ATR. It plots signals directly on the price c

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Accurate BUY & SELL 5 mins TF by RR

Detects swing break-of-structure (BOS) levels using confirmed pivot highs and lows. It records the most recent confirmed swing points and triggers a long trade when the bar closes above the last pivot high, or a short trade when it closes below the last pivot

Strategy v6 SMC / ICT / price actionBreakout
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe bos-curv-probe-01-swing-bos-trigger
1 stars

A momentum reversal strategy that uses the WaveTrend oscillator. A long is considered when the fast line crosses above its signal line from below the oversold level, and a short on a cross down from above the overbought level. A custom free energy and fractal

Strategy v6 Oscillators & momentumMean reversion
Updated 2 months ago · None stated GitHub repository of TnSovereign WaveTrend
106 stars

This overlay strategy plots Bollinger Bands from a simple moving average and standard deviation, plus a separate moving-average line and a background color when that average sits outside the bands. It opens a long when the source crosses above the lower band a

Strategy v4 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Advanced Bollinger Bands Strategy

Partial Exit Demo

by be-thomas
65 stars

This demonstration strategy showcases partial position exit functionality using Pine Script v4. It enters a long position of four units during the first 100 bars whenever no position is currently open. The script manages trade exits using two bracket orders: c

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of Partial Exit Demo
1 stars

This overlay strategy combines confirmed pivot break-of-structure with a curved linear-regression and ATR channel. It enters long when price breaks a confirmed pivot high and closes above the slope-adjusted channel midline, and enters short on the symmetric be

Strategy v6 BreakoutSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe bos-curv-probe-integration

TnSovereignAliceV6

by raybird
1 stars

TnSovereignAliceV6 evaluates price action using a five-part methodology comprising fractal efficiency, RSI, Bollinger Bands, proxy institutional flow, and MACD histogram momentum. Entries trigger when a user-defined minimum number of consensus conditions align

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of TnSovereignAliceV6
106 stars

This strategy enters long on an outside bar when the candle is bullish, the Klinger Volume Oscillator is positive, and price is above a Hull moving average. It enters short on an inside bar when the candle is bearish, the oscillator is negative, and price is b

Strategy v4 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Advanced OutSide Forex strategy
13 stars

This strategy runs on the main price chart and generates trade signals using moving average crossovers. It opens long positions when the fast simple moving average crosses above the slow simple moving average, and enters short positions on a bearish cross. Exi

Strategy v4 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Ruckard QuickFingers Luc A002
1 stars

This strategy plots the Kaufman Adaptive Moving Average on the price chart as an overlay. It generates buy signals on ta.crossover of close above the KAMA and sell signals on ta.crossunder of close below the KAMA. Long entries occur when flat or short, short e

Strategy v6 Moving averagesTrend Repaints
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Kanuck-Probe-01-Kama-State
1 stars

TnSovereignEntropyCausalityV6 evaluates directional information flow between volume and price using symbolic encoding and an approximated transfer entropy metric. It calculates whether volume precedes price moves across a selectable lookback window while filte

Strategy v6 VolumeTrend
Updated 2 months ago · None stated GitHub repository of TnSovereignEntropyCausalityV6

ADX + BB %B + AO + EMA

by hasnocool
106 stars

This strategy plots multiple exponential moving averages and a linear regression squeeze channel directly on the price chart. It executes 100-unit long and short trades by combining four EMA trend alignments, Bollinger Bands %B extremes, Awesome Oscillator mom

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ADX + BB %B + AO + EMA

Ruckard Scalping 03

by ruckard
13 stars

This strategy trades both long and short on the price chart. It enters long after a five percent or larger drop over the last thirty minutes and short after a matching rise. Two dollar-cost-averaging adds increase size when price moves against the position. A

Strategy v4 ScalpingMean reversion
Updated 1 year ago · None stated GitHub repository of Ruckard Scalping 03
1 stars

This strategy is a validation probe that forces a 500-bar history buffer. It calculates a long simple moving average of close, an RSI of close shifted by a configurable offset, and a lagged close. Those first two series are plotted but do not gate trades. It e

Strategy v6 Moving averagesOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe kanuck-probe-03-max-bars-back-500

ADX + RSI Strat

by hasnocool
106 stars

This strategy combines a 7-period RSI with an ADX filter to trade market regimes on the price chart. When the ADX indicates ranging conditions below a set threshold, it triggers entries on RSI overbought or oversold extremes. By default, the entry logic is inv

Strategy v4 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of ADX + RSI Strat
13 stars

This strategy demonstrates how to integrate TradingView signals with the Zignaly Crypto Trading Platform. It calculates a crossover between a 14-period and a 28-period simple moving average to generate trade signals directly on the price chart. Entries trigger

Strategy v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Zignaly Tutorial A061
1 stars

This validation strategy tests the simultaneous runtime handling of Kaufman's Adaptive Moving Average (KAMA), intra-bar tick counting, and deep historical buffer retention. It enters trades when the closing price crosses above KAMA, gated by an intra-bar tick

Strategy v6 Moving averagesTrend Repaints
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Kanuck-Probe-Integration

This overlay strategy enters only after a buy-side or sell-side liquidity sweep confirms a displaced fair value gap. It sizes the position from a fixed fraction of equity, uses a dynamic stop based on that risk, and sets the target from a reward-to-risk multip

Strategy v6 SMC / ICT / price actionVolatility & bands
Updated 2 months ago · None stated GitHub repository of TnSovereignIctSniperV6 [TeleNexus]

ADX Strategy

by hasnocool
106 stars

An ADX-based trend-following strategy that enters long positions when the positive directional indicator (DI+) crosses above the Average Directional Index (ADX) while ADX remains below a preset threshold and a fast EMA is above a slow EMA. It allows adding to

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ADX Strategy
1 stars

This strategy draws an exponential moving average of close and an ATR envelope around it on the price chart. It enters one long contract when close crosses above the upper band and one short contract when close crosses below the lower band, reversing only from

Strategy v6 BreakoutMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe kkb-probe-02-breakout-trigger

ADX | DMI Trend

by hasnocool
106 stars

This price-chart strategy treats a rising ADX above a chosen key level as a trend and uses plus and minus DI to choose direction. It enters long when plus DI leads and short when minus DI leads, if short trades are allowed. Volume and an EMA or SMA can block e

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ADX | DMI Trend
1 stars

This validation strategy calculates fast and slow simple moving averages of the closing price. It submits a fixed-size long entry when the fast SMA crosses above the slow SMA, and enters short when the fast SMA crosses below the slow SMA, reversing any open po

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe kkb-probe-03-margin-100-pct
106 stars

This strategy captures strong bullish momentum by combining a 200-period SMA baseline, a custom Bollinger Band, the True Strength Index (TSI) smoothed with WMAs, and the ADX trend strength indicator. It initiates long positions when price is above the 200 SMA,

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ADX_TSI_Bol Band Trend Chaser

PF probe kkb-probe-integration

by pineforge-4pass
1 stars

This strategy combines a one-dimensional Kalman filter with an EMA midline and ATR breakout bands. It enters long when the Kalman estimate rises and close crosses above the upper band, and short when the estimate falls and close crosses below the lower band. A

Strategy v6 TrendVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe kkb-probe-integration
1 stars

TnSovereignLiquidityMatrixV6 is a Pine Script v6 strategy that identifies liquidity zones for trading. It extracts a macro anchor point from the highest volume bar on a user-defined timeframe such as daily. Fibonacci levels are then extended using ATR multiple

Strategy v6 VolumeSupport & resistance
Updated 2 months ago · None stated GitHub repository of TnSovereignLiquidityMatrixV6
106 stars

This strategy calculates and plots aggregated Bitcoin volume collected across multiple exchanges, along with two volume moving averages in a separate pane. It enters long positions when price crosses above a fast EMA while remaining above a slow EMA, and enter

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Aggregate BTC Volume + EMA Strat

This strategy confirms swing pivot highs and lows and compares each new pivot with the previous swing of the same type. It draws on the price chart. A long entry fires when a confirmed pivot high is a higher high and the position is flat or short. A short entr

Strategy v6 Support & resistanceTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe liquidity-sweep-probe-01-pivot-swing
1 stars

This strategy draws on the price chart and trades structural breakouts. It stores confirmed pivot highs and lows, then looks for a close beyond the last pivot in the direction of an exponential moving average. A thermodynamic check must also pass, with free en

Strategy v6 SMC / ICT / price actionBreakout
Updated 2 months ago · None stated GitHub repository of TnSovereignMarketStructureV20

Alex Days HiLo Rajib

by hasnocool
106 stars

Alex Days HiLo Rajib tracks the highest high and lowest low over a customizable lookback period and overlays them directly on the price chart. When the current high exceeds the previous highest level, the script displays a signal arrow, and another arrow appea

Strategy v4 BreakoutSupport & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of Alex Days HiLo Rajib
1 stars

This strategy detects liquidity sweep patterns based on pivot high and pivot low levels calculated over configurable left and right bar periods. A bullish sweep occurs when a candle's low pierces below the most recent pivot low while closing back above it, tri

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Liquidity-Sweep-Probe-02-Sweep-Bar

This overlay strategy scores alignment of seven moving averages, lengths 5 through 200, of a user-selected type. Full stacks count as up or down, and partial alignment can add a smaller score. A rolling high-low period flags the current extreme, while an optio

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of AlignedMA and Cumulative HighLow Strategy

Priced Entry Demo

by be-thomas
65 stars

This strategy serves as an educational demonstration of price-conditioned order execution in Pine Script strategy design. Once a year filter condition is satisfied, the script places two long entry orders using stop prices set at specified increments above the

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of Priced Entry Demo

This strategy tracks liquidity sweeps across pivot highs and lows to trigger delayed reversal entries. It identifies pivots based on configurable left and right bar lengths and records sweeps when the price breaches a pivot but closes back inside it. Upon dete

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe liquidity-sweep-probe-03-reentry-on-sweep

This overlay strategy scores whether price and moving averages from 5 through 200 periods are fully or partially aligned, and it marks when the bar is a period high or low. Direction helpers compare a series with earlier bars over two configurable lookbacks. I

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of AlignedMA and Cumulative HighLow Strategy V2

Priced Entry demo

by be-thomas
65 stars

This strategy demonstrates priced long entries. After the calendar year passes 2020, it counts bars and, on the first such bar, submits two long stop orders of quantity two that share an OCA cancel group. One stop sits 35 ticks above the bar high and the other

Strategy v4 Breakout
Updated 5 days ago · GPL-3.0 GitHub repository of Priced Entry demo
1 stars

This strategy detects pivot highs and lows to establish swing structure, then identifies liquidity sweeps where price breaks the wick of the most recent pivot and closes back inside it. After a one-bar delay on continuation, it fires long entries on bullish st

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe liquidity-sweep-probe-integration

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