Synced with GitHub · updated today

Free TradingView Pine Scripts

8,340 free, open-source indicators, strategies and libraries for TradingView. Copy any script and paste it into the Pine Editor to use it on your chart.

New scripts by RSS
8,340 scripts

CTF Raid Indicator

by jerryinyang
5 stars

This indicator detects stop hunts, liquidity raids, and Rob Hoffman Inventory Retracement Bar breakouts directly on the main price chart. It tracks bullish and bearish retracement bars using dynamic arrays, identifying when incoming price action breaks these s

Indicator v5 SMC / ICT / price actionBreakout
Updated 2 years ago · None stated GitHub repository of CTF Raid Indicator

Koncord + MACD

by Following-BTC
5 stars

This indicator combines the Koncorde oscillator with a traditional Moving Average Convergence Divergence (MACD) indicator in a separate pane. It calculates Koncorde using a mixture of the Relative Strength Index (RSI), Money Flow Index (MFI), Bollinger Bands o

Indicator v5 Oscillators & momentumVolume
Updated 2 years ago · None stated GitHub repository of Koncord + MACD

This technical indicator combines multiple popular analysis tools into a single price chart overlay to optimize chart space. It calculates and plots the complete Ichimoku Cloud, 50 and 200 Simple Moving Averages, and standard Bollinger Bands. Furthermore, it t

Indicator v5 TrendMoving averages Repaints
Updated 3 years ago · None stated GitHub repository of Ichimoku + MAs + Bollinger + Liquidity Zone
5 stars

Moving Average Crossover Bot is a simple trend-following strategy that generates trading signals when a fast Simple Moving Average crosses a slow Simple Moving Average. It enters long positions on a bullish crossover and short positions on a bearish crossunder

Strategy v4 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of Moving Average Crossover Bot
5 stars

This indicator plots three volume-weighted average price lines on the price chart. Each line is anchored at a swing low, a swing high, or the highest-volume candle found inside a user-set lookback measured in days. It requests daily timestamps and chart-timefr

Indicator v5 VolumeSupport & resistance Repaints
Updated 3 years ago · MPL-2.0 GitHub repository of Armaan-Harpal-Custom-AAVWAP

ADW - Colour Trend

by ADWilkinson
5 stars

ADW - Colour Trend is an overlay indicator that normalizes the bar high and low against the highest high and lowest low over a chosen length, then averages those values. It paints price bars green when the average is above minus forty, red when it is below min

Indicator v5 Trend
Updated 3 years ago · Custom licence GitHub repository of ADW - Colour Trend

2 EMAs + RSI + Stochastic

by krosenfeld7
5 stars

This indicator overlays trend and momentum signals directly on the price chart. It calculates fifty-period and two-hundred-period exponential moving averages, a fourteen-period Stochastic oscillator smoothed with three-period simple moving averages, and a four

Indicator v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 2 EMAs + RSI + Stochastic

ZigZag++ Lucem Anb

by Kasra-Saeid
5 stars

ZigZag++ Lucem Anb calculates and plots MetaTrader 4 style ZigZag swing high and swing low points directly on the price chart. It connects major highs and lows with colored trend lines and marks market structure pivots with higher high, lower high, lower low,

Indicator v4 Support & resistanceTrend Repaints
Updated 3 years ago · MIT GitHub repository of ZigZag++ Lucem Anb

Smart Money Concepts

by northvia
5 stars

This indicator plots smart-money market structure on the price chart. It marks internal and swing breaks of structure and changes of character, optional swing points, and strong or weak highs and lows. It draws internal and swing order blocks filtered by volat

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 years ago · None stated GitHub repository of Smart Money Concepts
5 stars

This indicator identifies Fair Value Gaps by detecting price imbalances between the current bar and two bars prior on both current and higher timeframes. It draws shaded boxes on the price chart representing bullish and bearish gaps, along with optional midpoi

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 3 years ago · None stated GitHub repository of Fair Value Gap SpaceManBTC

This overlay indicator plots Central Pivot Range levels and bands across yearly, quarterly, monthly, weekly, daily, and six-hour periods. Each timeframe can be shown or hidden, and pivot and band colors are set separately. It also marks MACD momentum and EMA t

Indicator v5 Support & resistanceOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Pivot Boss Multi Timeframe CPR with MACD and EMA
5 stars

Greeffer's Scalping Indicator overlays higher-timeframe exponential moving averages, Bollinger Bands, and Donchian channels on the price chart. It flags a long when price touches the lower Donchian and lower band while the faster averages are not stacked beari

Indicator v5 Moving averagesVolatility & bands
Updated 4 years ago · None stated GitHub repository of Greeffer's Scalping Indicator

This indicator plots a detrended price oscillator and a random walk index in a separate pane. It subtracts a simple moving average of close from price, either with the average lagged or with price shifted back when the centered option is on. The oscillator lin

Indicator v4 Oscillators & momentumVolatility & bands
Updated 5 years ago · MIT GitHub repository of Detrended Price Oscillator with Random Walk Index

RSI MACD

by sawantuday
5 stars

This strategy enters long positions based on momentum confirmation from RSI and MACD, operating directly on the main price chart. It buys when the 14-period RSI exceeds 60 while the MACD line trades above the signal line. Positions close when the price crosses

Strategy v4 Oscillators & momentumMoving averages
Updated 5 years ago · CC0-1.0 GitHub repository of RSI MACD

SMA/EMA/VWAP

by KenlyBerkowitz
5 stars

This indicator combines multiple moving averages and volume-weighted average price calculations into a single price chart overlay. It calculates up to two adjustable Simple Moving Averages (SMAs), one user-configurable Exponential Moving Average (EMA), fixed 2

Indicator v4 Moving averagesTrend
Updated 6 years ago · None stated GitHub repository of SMA/EMA/VWAP

This strategy plots five simple moving averages on the price chart and trades crosses of a 150-period signal average. It enters long when the close crosses above that average and enters short when the close crosses below it, from a user-set start year onward.

Strategy v4 Moving averagesTrend
Updated 6 years ago · LGPL-3.0 GitHub repository of 150MA Cross BuyAndSell Strategy [d3nv3r]

This indicator identifies trend reversal signals on the price chart by combining exponential moving average crossovers with momentum and volatility filters. It calculates fast, slow, and long-term filter EMAs, along with RSI and ATR. A bullish reversal trigger

Indicator v6 TrendOscillators & momentum
Updated today · None stated GitHub repository of Advanced Trend Reversal Emoji Indicator

[innoobwetrust] Key Gaps

by InNoobWeTrust
4 stars

This indicator detects large price gaps by comparing each candle’s high-to-low range with the previous ATR and requiring a minimum body percentage. Qualifying candles are stored in a rolling buffer and drawn as price zones on the chart, limited to the most rec

Indicator v6 Support & resistanceVolatility & bands
Updated today · None stated GitHub repository of [innoobwetrust] Key Gaps
4 stars

This indicator calculates a short-period Relative Strength Index and monitors crosses around a center threshold. It triggers buy signals when the RSI crosses above the level and sell signals when it crosses below. Signal shapes are plotted directly on the main

Indicator v6 Oscillators & momentum
Updated yesterday · MIT GitHub repository of OptionX Noisy Test Alertcondition
4 stars

Lucid 100K is an automated evaluation strategy tailored for micro futures contracts such as MES, MGC, and MNQ on lower timeframes. It operates a two-phase state machine that moves from an initial risk-averse lock-in phase to an expanded payout phase once targe

Strategy v6 TrendMean reversion
Updated yesterday · None stated GitHub repository of Lucid 100K (MES/MGC/MNQ)

ADX Trend Filter

by latentwill
4 stars

This strategy enters long when a series labeled ADX is above a threshold and RSI is below 40, and enters short when that series is above the threshold and RSI is above 60. Both series are calculated with the RSI function, so the trend filter is not a true ADX.

Strategy v5 TrendOscillators & momentum
Updated 6 days ago · None stated GitHub repository of ADX Trend Filter

BTC Breakout Short Selling with Hedge is a strategy designed to trade downside breakouts. It identifies market lows over a specified lookback period to trigger short entries. Upon entry, it calculates dynamic stop loss and take profit levels based on Average T

Strategy v4 BreakoutVolatility & bands
Updated 8 days ago · GPL-3.0 GitHub repository of BTC Breakout Short Selling with Hedge
4 stars

This strategy enters a long position when a short RSI falls below a user threshold and price is above a simple moving average trend filter. It closes the long when RSI rises above a second threshold and does not set a stop loss. Position size defaults to full

Strategy v6 Oscillators & momentumMoving averages
Updated 13 days ago · MIT GitHub repository of RSI(2) pullback + TokIO check
4 stars

This indicator overlays an order flow intelligence suite directly on the price chart. It renders a liquidity heatmap across configured price zones, alongside an on-chart information panel displaying volume delta, cumulative volume delta, a momentum compass bas

Indicator v6 VolumeScreeners & dashboards
Updated 2 weeks ago · MIT GitHub repository of GHOST — OrderFlow Intelligence

Webhook Test

by beydah
4 stars

Webhook Test generates standard alert conditions designed to verify webhook integrations between TradingView and external automated trading bots. It evaluates conditions on the latest price bar to trigger simulated open long, close long, open short, and close

Indicator v6
Updated 3 weeks ago · MIT GitHub repository of Webhook Test
4 stars

JoppanFX Candlestick Patterns identifies classic single-candle and multi-candle price patterns directly on the main price chart. It checks for bullish patterns (Hammer, Inverted Hammer, Bullish Engulfing) and bearish patterns (Shooting Star, Hanging Man, Beari

Indicator v6 Candlestick patterns
Updated 3 weeks ago · None stated GitHub repository of JoppanFX | Candlestick Patterns
4 stars

Breakout Follow Trend is a quantitative trend-following strategy designed to capture volatility expansion. It triggers entries when price breaks out of Bollinger Bands, filtered by an EMA trend filter, optional candle overlap rules, and a volume moving average

Strategy v6 TrendVolatility & bands
Updated 3 weeks ago · None stated GitHub repository of Breakout Follow Trend
4 stars

Meridian - Futures Context is an intraday analysis indicator designed for US index futures. It measures volume participation using relative volume, calculates rolling realized volatility, and evaluates trend context through VWAP slope and EMA structures. Displ

Indicator v6 VolumeVolatility & bands
Updated 7 weeks ago · MPL-2.0 GitHub repository of Meridian - Futures Context
4 stars

This strategy enters long when the fast EMA crosses above the slow EMA while ADX is at least the minimum and DI plus exceeds DI minus. It enters short on the opposite cross with DI minus above DI plus. Each entry sets an ATR-based stop and take profit using th

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of ADX Trend Strategy [trugurpala]

42H Map

by aurorascarlet1102
4 stars

42H Map calculates custom time cycle structures and session ranges directly on the price chart. It partitions market action into forty-two-hour cycles, ten-and-a-half-hour micro-sessions, half-week periods, and quarter-month segments to track highs, lows, and

Indicator v5 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of 42H Map

GemHunter v4

by Finland93
4 stars

GemHunter v4 classifies market conditions into bullish, bearish, or neutral regimes using a multi-indicator voting system. It combines exponential moving average alignment, MACD momentum, and RSI strength, optionally gated by ADX trend strength and higher-time

Indicator v6 TrendOscillators & momentum
Updated 4 months ago · MPL-2.0 GitHub repository of GemHunter v4

Air Pocket Profile [FEELS]

by VolodymyrFilias
4 stars

Air Pocket Profile builds a range-distributed volume profile over a user-set lookback and draws it on the price chart, extending it by a projection length. Rows below a fraction of peak volume form air-pocket zones, while the heaviest row is the volume anchor

Indicator v6 VolumeSupport & resistance
Updated 4 months ago · MIT GitHub repository of Air Pocket Profile [FEELS]
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
4 stars

This overlay indicator draws an on-chart depth-of-market table that splits volume at each price tick into estimated buy volume, sell volume, delta, and session volume. Growing text bars compare buyers and sellers, and recent bars approximate resting bid and as

Indicator v5 VolumeScreeners & dashboards
Updated 6 months ago · None stated GitHub repository of Custom DOM - Bookmap Style
4 stars

This indicator combines five normalized oscillator channels: RSI, stochastic, MACD histogram, money flow index, and the ADX directional difference. It cross-subtracts channel pairs with a fixed or correlation-based weight meant to reduce shared overlap, then s

Indicator v5 Oscillators & momentumVolume
Updated 6 months ago · None stated GitHub repository of MVSU Decontamination

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
4 stars

This indicator recolors price candles from recent volume and range. It marks climax bars when current volume times range exceeds the prior ten-bar peak or volume is at least twice a ten-bar average, and rising bars at one and a half times that average. Bullish

Indicator v5 VolumeCandlestick patterns
Updated 9 months ago · None stated GitHub repository of Price-Volume Analysis

Bollinger Bands

by YooooungLee
4 stars

This indicator plots Bollinger Bands on the price chart. It uses a lookback length and a multiplier, the usual controls for the middle band and the distance of the upper and lower bands. The length setting changes how many bars enter the calculation, and the m

Indicator v6 Volatility & bands
Updated 10 months ago · Apache-2.0 GitHub repository of Bollinger Bands
4 stars

This indicator computes the Watchtower Axis as a 257-period weighted moving average of closing prices to establish the main trend baseline. It defines volatility gates using the highest high and lowest low over 463 periods, along with a 377-period exponential

Indicator v6 TrendMoving averages
Updated 10 months ago · MIT GitHub repository of Miela Labs | John Dee's Watchtower

About the Pine Script Library

The ForexR Pine Script Library collects open-source TradingView indicators, strategies and libraries that are published on GitHub. Every script links to its repository, so you can see the author's latest version, issues and licence. Where the licence allows it, the full code is on the script's page, ready to copy into TradingView's Pine Editor. Stars, updates and licences are synced from GitHub every day, and new scripts are added every week.

Each script is read automatically before it is listed: it must declare an indicator, strategy or library for Pine Script version 4 or later, and copies of the same code are listed only once. The summaries and tags are written automatically from the code and the README. They describe what a script does; they are not a recommendation, and nothing here is tested or endorsed by ForexR.

Indicators and backtests describe the past. Check any strategy in the Strategy Tester and on a demo account before you trade with it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

Pine Script Library FAQ

What is Pine Script?

Pine Script is the programming language of TradingView. Indicators, strategies and libraries written in it run directly on TradingView charts: an indicator draws lines, zones or signals, a strategy places simulated trades that the Strategy Tester reports on, and a library holds functions other scripts can import.

How do I add a Pine Script to my TradingView chart?

Open a script here and press Copy script. In TradingView, open the Pine Editor at the bottom of the chart, create a new indicator or strategy, select all of the template text and paste over it. Press Save, then Add to chart. A strategy's trades appear in the Strategy Tester tab.

Are these Pine Scripts free?

Yes. Every script listed here is published on GitHub, so you can read and use it at no cost. ForexR shows the full code only when the author published it under an open licence, such as MIT, GPL or the Mozilla Public License that TradingView adds to new scripts. For other scripts the Copy button reads the file straight from GitHub. Check the licence before reusing code in your own work.

Why are there no Pine Script v3 or older scripts?

Pine Script versions 1 to 3 are years out of date and miss most of the functions current scripts rely on. The library lists scripts written for versions 4, 5 and 6, and you can filter by version. Version 6 is the current one.

What does "Repaints" mean?

A repainting script can change its signals after the fact: on the live bar, or when it reads a higher timeframe before that bar has closed. Its history then looks better than it would have traded in real time. Scripts where the code or the author says so are marked Repaints, and the "Hide repainting" filter leaves them out.

How does ForexR choose which scripts to list?

A crawler searches GitHub every week for Pine Script files, reads each one and keeps scripts written for Pine version 4 or later in repositories with at least one star. Copies of the same code are listed once, under the most-starred repository. Repositories that ship programs, hide downloads behind passwords or show signs of bought stars are left out. Stars, updates and licences are refreshed from GitHub every day, and the summaries are written automatically from each script's code and README.

Trade on TradingView With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers