Synced with GitHub · updated yesterday

Free TradingView Pine Scripts

10,850 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
10,850 scripts
2 stars

This indicator plots a Nadaraya-Watson kernel estimate of the selected source on the price chart and draws upper and lower envelopes around it. A Gaussian window weights nearby bars. Bandwidth sets how wide that smoothing is, and a multiplier scales the mean a

Indicator v5 TrendVolatility & bands Repaints
Updated 2 years ago · None stated GitHub repository of Nadaraya-Watson Envelope [LuxAlgo]

PerformanceTable

by jvalen01
2 stars

PerformanceTable displays a compact dashboard table on the main chart summarizing key stock metrics. It calculates the 20-day Average Daily Range (ADR), an IBD-style Relative Strength (RS) rating, 10-day average trading volume, quarterly earnings and revenue e

Indicator v5 Screeners & dashboards
Updated 3 years ago · None stated GitHub repository of PerformanceTable
2 stars

This strategy calculates the built-in Supertrend indicator using customizable ATR length and factor multiplier parameters, plotting the trend lines and colored fills directly on the price chart. It executes a long order when the Supertrend direction flips to b

Strategy v5 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of 슈퍼트렌드 전략

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator overlays higher-timeframe candles and traditional pivot levels on the price chart. It draws open-close or high-low candle bodies, optional wicks, and history modes that include shifting the previous higher-timeframe candle onto the current one.

Indicator v5 Candlestick patternsSupport & resistance
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

Smart Money Concepts [LuxAlgo]

by srinivas-yarramsetti
2 stars

This indicator plots Smart Money Concepts elements on the price chart including internal and swing order blocks, bullish and bearish structures with BOS and CHoCH breaks, fair value gaps, equal highs and lows, and swing points. It can color candles according t

Indicator v5 SMC / ICT / price actionCandlestick patterns Repaints
Updated 3 years ago · None stated GitHub repository of Smart Money Concepts [LuxAlgo]

This indicator overlays a Supertrend calculation with filled trend zones and ATR-based premium or discount offset lines directly on the price chart. Upon direction changes in the Supertrend, it identifies highest highs and lowest lows during the preceding tren

Indicator v5 TrendSupport & resistance
Updated 3 years ago · None stated GitHub repository of [JL] Supertrend Zone Pivot Point with Zigzag Fib
2 stars

This trend-following strategy plots an 8-period WMA on close prices, a 10-period WMA on open prices, a 100-period Hull Moving Average, and a VWAP EMA overlay on the price chart. It enters long when the fast WMA crosses above the slow WMA while above the HMA fi

Strategy v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of [CBB] LWMA OCx 8/10 Strategy

Mini-Project

by Core-Four
2 stars

Mini-Project is a multi-indicator trading strategy that overlays technical indicators directly on the price chart. It provides modular components including Linear Regression, the Relative Strength Index (RSI), MACD, Parabolic SAR, and Supertrend. Users can tog

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Mini-Project

Sassiz Chandelier Exit

by sassiz-root
2 stars

This Pine Script v5 strategy calculates ATR-based trailing stops for crypto trading on the price chart. It defines a long stop as the highest close minus ATR times multiplier and a short stop as the lowest close plus ATR times multiplier. The script dynamicall

Strategy v5 TrendVolatility & bands
Updated 3 years ago · MIT GitHub repository of Sassiz Chandelier Exit

Manual DR w/ Waddah

by theupslidedown
2 stars

This indicator calculates and displays Defining Range (DR) and implied Defining Range (iDR) levels across selected trading sessions, such as main, early, and Asian ranges. It plots session high and low lines, extended projections, range boxes, and Fibonacci le

Indicator v5 Support & resistanceSessions & time
Updated 3 years ago · None stated GitHub repository of Manual DR w/ Waddah

Initial Balance

by MuMuLLC
2 stars

The Initial Balance indicator highlights high, low, and 50% midpoint levels calculated over a defined session timeframe, such as the opening hour. It draws primary initial balance bounds, optional extended x2 projection levels, intermediate 50% levels, and sha

Indicator v5 Support & resistanceSessions & time
Updated 3 years ago · MIT GitHub repository of Initial Balance

Donchian Trend Ribbon

by ctkqiang
2 stars

This indicator plots a stacked trend ribbon in a separate pane from Donchian channel breakouts. For a chosen period it marks an uptrend when the close exceeds the previous highest high and a downtrend when the close falls below the previous lowest low, otherwi

Indicator v4 TrendBreakout
Updated 3 years ago · Apache-2.0 GitHub repository of Donchian Trend Ribbon

MACD #1

by storm0611
2 stars

MACD #1 is a momentum indicator that calculates the MACD line as the difference between a fast EMA and a slow EMA of the close price. It also computes the signal line as the EMA of the MACD line with a default length of 9. The script plots the MACD line in blu

Indicator v5 Oscillators & momentumMoving averages
Updated 4 years ago · None stated GitHub repository of MACD #1

Supertrend UP/DOWN

by minaecer
2 stars

This strategy plots a Supertrend line on the price chart and colors it green in an up direction and red in a down direction. It also marks direction changes with arrows below the bar. Entries come from a separate moving-average rule: a long when the 14-period

Strategy v5 TrendMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of Supertrend UP/DOWN

Calculates and plots daily moving averages, including 200, 100, and 50-period SMAs as well as a 20-period EMA, onto intraday price charts. It also includes an optional Williams Alligator Jaw line calculated using a smoothed moving average. Settings allow adjus

Indicator v5 Moving averagesTrend Repaints
Updated 4 years ago · MIT GitHub repository of Daily Moving Averages on Intraday Chart

Breaking fractals

by DaniilOkrug
2 stars

This strategy identifies trend changes using fractals from a higher timeframe and the current chart timeframe. It opens buy or sell orders on breaks of lower-timeframe fractals aligned with the higher-timeframe trend. Normal trading mode exits on trend reversa

Strategy v5 TrendBreakout
Updated 4 years ago · MIT GitHub repository of Breaking fractals

Volume

by pureweb-creator
2 stars

This indicator plots trading volume on a separate pane below the price chart. It colors the volume bars red if the previous close is higher than the current close, or aqua if lower, when the 'Color bars based on previous close' setting is enabled. The script a

Indicator v4 Volume
Updated 5 years ago · GPL-3.0 GitHub repository of Volume

MC - Defensive

by Metzenas
2 stars

MC - Defensive calculates a WaveTrend oscillator combined with a volume-weighted money flow index to generate buy and sell signals directly on the price chart. Buy signals trigger when WaveTrend crosses up in oversold conditions with low money flow values, whi

Indicator v4 Oscillators & momentumVolume
Updated 5 years ago · None stated GitHub repository of MC - Defensive

Overbought

by kat3samsin
2 stars

This strategy identifies overbought conditions in uptrends for long entries. It calculates RSI with 14 periods, 50 and 200 period SMAs, ALMA smoothed close, and Stochastics with customizable K D and smooth periods. Entries occur when RSI exceeds 70 price excee

Strategy v4 TrendOscillators & momentum
Updated 5 years ago · MIT GitHub repository of Overbought
2 stars

This indicator implements a three-dimensional matrix as one Pine float array, with sheet, row, and column counts stored in the first three values. It creates a filled matrix, reads those dimensions, and returns the start and end indexes of a chosen sheet. It a

Indicator v4
Updated 5 years ago · MIT GitHub repository of 3D array datastructure functions

Gamma/X Killzone Sweeps (strategy)

by OverleveragedWhale
1 stars

A strategy version of the killzone sweep idea. In the Asia, London, New York AM and PM windows it waits for the previous killzone's high or low to be swept and reclaimed, then enters on the close with a stop just past the wick and a fixed point target for ES o

Strategy v6 SMC / ICT / price actionSessions & time

Asif Dip v2 Daily

by Asifali549
1 stars

A long-only daily strategy for crypto that buys short-term dips inside an uptrend. It requires the close above a long EMA, a medium EMA above the long one, an optional Bitcoin trend filter, and a very low three-period RSI. Entry is at the next open. The stop i

Strategy v6 Mean reversion
Updated yesterday · None stated GitHub repository of Asif Dip v2 Daily
1 stars

A separate-pane indicator that runs a percentage-deviation ZigZag state machine on up to eight timeframes, from one minute to daily, and shows whether each is currently in an up leg after a swing low or a down leg after a swing high. Settings choose the deviat

Indicator v6 Trend Repaints
Updated yesterday · None stated GitHub repository of BD ZigZag MTF Consensus

Flat Zone Detector

by xopromo
1 stars

An indicator on the price chart that detects sideways ranges and flags breakouts from them. For each bar it counts how many of the previous N completed bars overlapped a zone of plus or minus a multiple of ATR around the current close, giving a flat score from

Indicator v6 BreakoutVolatility & bands
Updated yesterday · None stated GitHub repository of Flat Zone Detector

6 EMAs Integrated

by sean-ccho
1 stars

Plots six exponential moving averages on the price chart, with default lengths of 5, 10, 20, 50, 100 and 200 applied to the close. The three short-term lines and three long-term lines are grouped in the settings, and each line has its own on/off switch and len

Indicator v5 Moving averagesTrend
Updated yesterday · None stated GitHub repository of 6 EMAs Integrated
1 stars

This indicator calculates the classic Awesome Oscillator by subtracting a 34-period simple moving average from a 5-period simple moving average of median prices. It plots the resulting values as a color-coded column histogram in a separate pane, turning green

Indicator v6 Oscillators & momentumMoving averages
Updated yesterday · Custom licence GitHub repository of Awesome Oscillator
1 stars

A separate-pane oscillator that plots a z-score, the distance of price from its rolling mean measured in standard deviations, smoothed over a few bars. Dots mark turns that happen outside a chosen zone around zero. An AR(1) half-life readout and optional regim

Indicator v6 Mean reversionOscillators & momentum
Updated yesterday · None stated GitHub repository of Mean Reversion (z-score)

Auto Trend Lines

by majixai
1 stars

An indicator that finds small and large pivot highs and lows and automatically draws trend lines through them on the price chart. A line proximity filter based on ATR reduces clutter, and a breakout is flagged after a set number of consecutive closes beyond a

Indicator v6 Support & resistanceBreakout
Updated yesterday · None stated GitHub repository of Auto Trend Lines
1 stars

A research strategy for the price chart, meant for a five-minute chart with Moscow time. It measures the price move between two time points of the same day, and if the move exceeds a threshold it opens a position at the end of the second slot, either with the

Strategy v6 Sessions & timeMean reversion
Updated yesterday · None stated GitHub repository of Session Triples - 5 Stocks

RSI 30 Turbo Swing

by vriken
1 stars

A long-only strategy that buys stocks after the daily 14-period RSI closes below an oversold level, optionally only above the 200-day average and in a bullish market regime based on an index and VIX. Trades close after a set number of days or earlier when the

Strategy v6 Mean reversionOscillators & momentum Repaints
Updated yesterday · None stated GitHub repository of RSI 30 Turbo Swing
1 stars

Draws confluence zones and options open interest levels on the price chart from a text block pasted into a settings box. Zones are coloured by how many layers of levels overlap (two, three, or four and more), and can be limited to volume-anchored zones. Open i

Indicator v6 Support & resistance
Updated yesterday · None stated GitHub repository of C.og - Confluence Zones + OI v2
1 stars

An overlay that builds a skewed same-day iron condor on the S&P 500 index or its ETF and mini equivalents. After an opening observation window it measures price drift and range, then places short strikes at a base distance, shifted asymmetrically when drift is

Indicator v6 Sessions & timeVolatility & bands
Updated yesterday · None stated GitHub repository of ZeroDTE Iron Condor v2

Muster-Scanner v9.1

by mohidamini-prog
1 stars

A chart pattern scanner that confirms pivots after a set number of bars and then draws classic formations on the price chart, including head and shoulders, double and triple tops and bottoms, triangles, rectangles, wedges, megaphones and V reversals, plus gold

Indicator v5 BreakoutSMC / ICT / price action
Updated yesterday · None stated GitHub repository of Muster-Scanner v9.1
1 stars

A rule-based smart money confluence indicator for the price chart, with a recommended 15-minute chart. It scores a higher timeframe EMA bias, break of structure, liquidity sweep, fair value gap point of interest and rejection candle, then grades setups by scor

Indicator v6 SMC / ICT / price actionSupport & resistance

Strategy Template

by Jahanzaib211
1 stars

A strategy template that enters long when a fast EMA crosses above a slow EMA while price is above a higher-timeframe EMA, and short on the opposite setup, optionally limited to a session window. Entries happen only on a confirmed bar with no open position. Ea

Strategy v6 Moving averagesTrend
Updated yesterday · MIT GitHub repository of Strategy Template

Confluence Trend + Momentum

by nvolpe2007-cell
1 stars

A long-or-cash strategy that holds a position only when two conditions agree: the close is above a 100-bar simple moving average and above the close from 20 bars earlier. Otherwise it stays in cash. By default it requests daily bars whatever the chart timefram

Strategy v6 TrendMoving averages
Updated yesterday · None stated GitHub repository of Confluence Trend + Momentum
1 stars

This indicator overlays rolling cost anchors, volatility-derived GetDelta bands, and liquidity provider ranges onto the price chart alongside pinbar candlestick detection. It calculates market valuation zones, shading discount and premium areas while tracking

Indicator v6 Candlestick patternsVolatility & bands
Updated yesterday · AGPL-3.0 GitHub repository of BL-ESW Pinbar Market Lab Pro

Custom Imbalance

by teshmi9z-beep
1 stars

A simple indicator that draws boxes on the price chart over fair value gaps, also called imbalances. A bullish gap is flagged when the current low is above the high from two bars earlier, and a bearish gap when the current high is below the low from two bars e

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated yesterday · MIT GitHub repository of Custom Imbalance

ML Strategy Webhook

by GeekRabbit007
1 stars

A simple strategy built to feed a server with alert data. It plots a fast and a slow EMA, 12 and 26 by default, goes long when the fast crosses above the slow, and on the opposite cross closes the long and opens a short. There is no stop loss or take profit, s

Strategy v6 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of ML Strategy Webhook

Dip Mafia HODL

by 0xCaretaker
1 stars

A long-only strategy that buys dips and never sells during the test. A buy needs a lower Bollinger Band touch, by default with a close below the midline, plus a MACD or Impulse MACD crossover. Position size is a percent of equity or a fixed cash amount per buy

Strategy v6 Mean reversionOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Dip Mafia HODL

RCCE Scanner v6

by cianfru
1 stars

A strategy that combines four engines into one signal: a Z-score regime classifier, a weekly midline heat score, an exhaustion detector for absorption and climax bars, and a synthesizer that weighs them using confidence thresholds. Entries and exits appear as

Strategy v6 TrendVolatility & bands Repaints
Updated 2 days ago · None stated GitHub repository of RCCE Scanner v6

Bounce 2.0

by mphinance
1 stars

Overlays five EMAs at 8, 21, 34, 55 and 89 on the price chart and marks a Bounce 2.0 pullback setup. The setup needs the shorter EMAs in bullish order, ADX at or above 25, a stochastic reading at or below 40 and price within a band around the 21 EMA. A label a

Indicator v6 TrendMoving averages
Updated 2 days ago · Custom licence GitHub repository of Bounce 2.0

IQ Trend Beams

by ankurksoni
1 stars

A price-chart overlay that fits trend support and resistance channel lines using a Kalman-filter based engine fed by intrabar volume and price data. Lines are shown forming, then lock in place and are later restyled as broken history. A tempo mode of fast, med

Indicator v6 Support & resistanceTrend
Updated 2 days ago · None stated GitHub repository of IQ Trend Beams

TopBot Adaptive

by drewstake
1 stars

Prints manual long and short signal labels on the price chart using an adaptive method trained on recent settled trade paths. It works on standard time-based charts and scales stop limits with chart bar length. Positions exit only at the stop or target, stay o

Indicator v6 AI / machine learning
Updated 3 days ago · None stated GitHub repository of TopBot Adaptive

Alerts & Automation

by jayadevrana
1 stars

This indicator plots a fast and a slow exponential moving average on the price chart and marks a buy when the fast average crosses above the slow average and a sell when it crosses below. It builds a plain-text price message and a JSON order message that inclu

Indicator v6 Moving averages
Updated 3 days ago · MPL-2.0 GitHub repository of Alerts & Automation

Skipp Labels

by skipp-dev
1 stars

Skipp Labels is a Pine Script v6 helper library designed to assist with label creation and memory management on price charts. It exports functions for string safety and buffer control. The safe label text function truncates long strings to a maximum of 120 cha

Library v6
Updated 3 days ago · None stated GitHub repository of Skipp Labels

Sleep Zone BG

by jometa9
1 stars

A simple time-based background shader for intraday charts. It colors the chart background inside or outside a chosen daily time range, by default 22:00 to 07:00 in an Argentina timezone, with options for active weekdays, fill mode and colors. Optional dotted v

Indicator v6 Sessions & time
Updated 4 days ago · None stated GitHub repository of Sleep Zone BG

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