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

Sessions [LuxAlgo]

by lappingio
1 stars

A session overlay that marks up to four trading sessions, by default New York, London, Tokyo and Sydney, with shaded range boxes. For each session it can also show a trendline, a mean line, a session VWAP and maximum and minimum markers. Session names, times a

Indicator v5 Sessions & time
Updated 1 year ago · None stated GitHub repository of Sessions [LuxAlgo]

Smoothed Heiken Ashi

by turnupdigital
1 stars

An indicator that draws smoothed Heiken Ashi candles on the price chart. Prices are smoothed with a selectable moving average type and length before the Heiken Ashi calculation and again afterwards, using an imported library of average types. Candles are shade

Indicator v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Smoothed Heiken Ashi

MarketAnalysis

by MarcosACH
1 stars

MarketAnalysis is a helper library for Pine Script developers that provides modular functions to compute Fibonacci price levels. It offers calculations for both bullish and bearish Fibonacci retracements using low and high price points. Additionally, it calcul

Library v5
Updated 1 year ago · None stated GitHub repository of MarketAnalysis
1 stars

This indicator identifies significant volume spikes on daily and weekly timeframes by comparing current volume against moving averages over user-defined lookback periods. It plots the daily volume ratio as a histogram in a separate pane, with blue columns for

Indicator v5 Volume
Updated 1 year ago · GPL-3.0 GitHub repository of ezVolume Spike Detector

Momentum Trend Strategy

by yagyesh-bobde
1 stars

The Momentum Trend Strategy combines the Average Directional Index (ADX), SuperTrend, and Heikin Ashi candle colors to identify and trade trend momentum on the price chart. It enters long or short positions when ADX exceeds an entry threshold and SuperTrend al

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Momentum Trend Strategy
1 stars

This indicator plots envelope bands based on a moving average or exponential moving average of a chosen price source. It computes RSI with user-set length and source. Signals trigger on crossovers: buy when price crosses the lower envelope band while RSI falls

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of ENVELOPE - RSI - Buy Sell Signals

Lab-Doi-01

by theteelek
1 stars

An experimental strategy lab script that tracks a simulated long position between a start date and an end date, drawing dashed vertical lines at both dates and a line for the average entry price. A table at the bottom left shows position size in BTC and open p

Strategy v6
Updated 1 year ago · None stated GitHub repository of Lab-Doi-01

Channel Breakout Strategy

by Studentcodee
1 stars

A Pine v6 strategy that trades a rolling channel breakout on the price chart. It tracks the highest high and lowest low over a length setting, then places a stop order to go long one tick above the upper bound and a stop order to go short one tick below the lo

Strategy v6 Breakout
Updated 1 year ago · None stated GitHub repository of Channel Breakout Strategy
1 stars

A strategy that trades with two EMAs. A long entry needs price above the short EMA, which is above the long EMA, plus either RSI below a level or price within a tolerance of a recent pivot low. Shorts mirror this in a downtrend near pivot highs. Exits use ATR-

Strategy v6 TrendSupport & resistance
Updated 1 year ago · None stated GitHub repository of Optimized Trading Strategy

Range

by equitymarkets
1 stars

Range calculates relative price ranges across four user-specified currency pairs by comparing high and low values against close prices from a secondary timeframe. It computes the average range across these pairs to establish a baseline volatility benchmark. Th

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 1 year ago · MIT GitHub repository of Range
1 stars

Shows a compact table on the price chart counting down the time left until the next candle closes on several timeframes: 1, 5 and 15 minutes, 1 hour, 4 hours and 1 day. Each row can be switched on or off and given its own colour. The text turns to a warning co

Indicator v6 Screeners & dashboardsSessions & time

This strategy trades S50 TFEX USDTHB contracts on the price chart. It detects swing highs and swing lows with pivot points to generate long entries on swing highs and short entries on swing lows. The ATR indicator calculates dynamic stop-loss distances while t

Strategy v6 Volatility & bandsOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of S50 TFEX Strategy With ATR and Stoploss

ETHBTC MTPI

by Mikelkulla
1 stars

ETHBTC MTPI is a multi-indicator trend-following strategy designed for crypto pairs to determine relative market strength. It combines up to five toggleable components: Liquidity-Weighted Supertrend, dual exponential moving averages, DEMA Supertrend, DEMA AFR,

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of ETHBTC MTPI
1 stars

The IBKR Safe Forex Strategy is a Pine Script v6 strategy that trades forex pairs using crossovers of 10-period and 50-period EMAs, filtered by a 200-period EMA and restricted to London or New York session overlap. It enters long positions on fast EMA above sl

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of IBKR Safe Forex Strategy

RSI形态策略

by fuyuanyuan
1 stars

This indicator evaluates multiple Relative Strength Index (RSI) patterns combined with volume surge criteria to identify potential trend reversals and breakout entries. It tracks five distinct bullish setups, including double bottoms, hook reversals, bullish d

Indicator v6 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of RSI形态策略
1 stars

This strategy computes a Donchian channel from the highest high and lowest low over a set period, plus a middle line. It goes long when the close breaks above the previous channel high and short when it breaks below the previous channel low. Each trade has an

Strategy v5 BreakoutTrend
Updated 1 year ago · None stated GitHub repository of Donchian Channel Breakout
1 stars

A separate-pane indicator that computes the Money Flow Index and adapts its overbought, neutral and oversold levels using a clustering routine trained on recent data. Inputs set the MFI length, the number of training bars and the iterations per bar. An adjuste

Indicator v5 Oscillators & momentumVolume
Updated 1 year ago · None stated GitHub repository of AI Adaptive Money Flow Index
1 stars

This strategy compares current bar volume and price direction against the previous bar using a lookback period. It plots colored volume columns in a separate pane to visualize bullish or bearish volume trends and draws a liquidation level threshold line. Long

Strategy v5 VolumeSupport & resistance
Updated 1 year ago · MIT GitHub repository of BuySell Volume Strategy

COT Legacy

by ivansoft
1 stars

An indicator in a separate pane that plots Commitment of Traders legacy report metrics for the chart symbol, such as open interest, noncommercial, commercial and nonreportable positions and trader counts. Settings pick the metric, direction, data type, a selec

Indicator v6
Updated 1 year ago · None stated GitHub repository of COT Legacy

BTC Trend

by mkdir700
1 stars

A separate-pane indicator that plots the Bitcoin price from the BTCUSDT symbol, scaled by an adjustable factor so it fits beside other panes, whatever chart symbol is open. The line is coloured green when the latest change is up or zero and red when it is down

Indicator v5 Trend
Updated 1 year ago · None stated GitHub repository of BTC Trend
1 stars

This overlay indicator finds pivot highs and lows from high/low or close/open prices and uses them to draw support and resistance channels and trend lines on the price chart. Minimum strength, maximum channel width, and a cap on how many S/R levels appear filt

Indicator v5 Support & resistanceMoving averages
Updated 1 year ago · None stated GitHub repository of AMD-strategy (All Fixes)
1 stars

This strategy plots price and Bollinger Bands on the chart using a 120-bar SMA basis and 2 standard deviation multiplier. It generates signals from band touches and an exit SMA of 110 bars. Risk management limits losses to 6 percent of trade value. Money manag

Strategy v5 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of Bollinger Bands Strategy

Support Resistance - Dynamic v2

by MuhammadHussain07
1 stars

Support Resistance - Dynamic v2 finds pivot highs and lows on the price chart and groups nearby pivots into support and resistance channels. Settings set the pivot period, whether highs and lows or open and close are used, how many pivots are stored, the maxim

Indicator v5 Support & resistance Repaints
Updated 1 year ago · None stated GitHub repository of Support Resistance - Dynamic v2
1 stars

A Pine v5 indicator, with Spanish labels, that draws liquidity voids, meaning fair value gaps, as boxes on the price chart. It can show gaps that have already been filled, add text labels, and switch between a historical mode and another mode. A bar count sets

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of Liquidity Voids (FVG)
1 stars

HMA-Kahlman Trend & Trendlines plots a smoothed directional trend ribbon directly on the price chart by combining Hull Moving Average calculations with an optional Kalman filter. It evaluates two moving lines alongside their average, changing color to reflect

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of HMA-Kahlman Trend & Trendlines

Fractal Enculfing Caldles

by fiji-solutions
1 stars

This indicator identifies bullish and bearish engulfing candlestick patterns directly on the price chart. To refine signal quality, it provides three optional filters: an ATR filter to cap maximum candle size relative to volatility, a swing high or low filter

Indicator v5 Candlestick patternsMoving averages
Updated 2 years ago · None stated GitHub repository of Fractal Enculfing Caldles

Jinni v1

by Hurairahengg
1 stars

Jinni v1 is an overlay indicator that highlights the Sydney trading session and plots buy or sell signals based on dual exponential moving average trends. It draws a dynamic box around the Sydney session price range and applies time filters to exclude Fridays

Indicator v5 Sessions & timeMoving averages
Updated 2 years ago · None stated GitHub repository of Jinni v1

Average True Range

by JoeTonDev
1 stars

An ATR indicator in a separate pane with four display types: regular price units, percentage of close, ticks or currency value for a chosen position size. The smoothing method can be EMA, RMA, SMA or WMA, and an EMA of the ATR is plotted and colored by rising

Indicator v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of Average True Range

algo-trade-forex

by akash-yellgetti
1 stars

A strategy-type script that draws on the price chart and combines two ideas. Pivot-based support and resistance lines are plotted from left and right bar counts, with breakout labels when price crosses a level on rising volume, and alerts for broken support or

Strategy v5 Support & resistanceBreakout
Updated 2 years ago · None stated GitHub repository of algo-trade-forex

theIndicator v1.9

by darkshloser
1 stars

Overlays several SuperTrend-style trailing stop lines on the price chart, each built from an ATR period, ATR multiplier and source, with a choice of using wicks or closes. Lines are green while the direction is up and red while it is down, with a flip when pri

Indicator v5 Trend
Updated 2 years ago · Apache-2.0 GitHub repository of theIndicator v1.9

RSI Strategy

by SOWRAJ
1 stars

This strategy calculates the relative strength index of the close and plots that oscillator plus oversold and overbought horizontal levels on the price chart because overlay is on. It opens a long when RSI crosses above the oversold level and a short when RSI

Strategy v5 Oscillators & momentumMean reversion
Updated 2 years ago · None stated GitHub repository of RSI Strategy

TD_Indicator

by subhrapratim07
1 stars

This indicator implements Tom DeMark Sequential logic directly on the price chart. It calculates TD buy and sell setups by comparing closes against four bars prior, tracks setup counts up to nine, and evaluates bar lows and highs to identify perfected setup co

Indicator v5 Mean reversionTrend
Updated 2 years ago · None stated GitHub repository of TD_Indicator
1 stars

A two-sided strategy that looks for a fan of fast EMA, medium EMA and slow SMA in order, a pin bar candle and a bar piercing one of the averages. It then places a stop order beyond the previous bar high or low. Exits combine a hard stop in pips with a trailing

Strategy v5 TrendCandlestick patterns Repaints
Updated 2 years ago · None stated GitHub repository of Grail Trailing Stop Strategy

Rocket Launches

by yankeexlr
1 stars

An overlay for crypto charts that follows a staged sequence built from RSI and four simple moving averages. It flags bearish candles with RSI under 20, records their lows, watches for crosses above the 50-period and 300-period averages, and stores the low of a

Indicator v5 Mean reversionOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Rocket Launches

AmiComStrategy

by amico1234
1 stars

AmiComStrategy is an indicator that calculates correlations between securities using the Corell indicator over specified timeframes such as 5D. It filters trading opportunities based on session times like 1300-1700 and security up and down times such as 3H. Th

Indicator v4 Sessions & timeVolatility & bands
Updated 2 years ago · None stated GitHub repository of AmiComStrategy

ARI-DPO 2.0

by alessioricco
1 stars

This indicator calculates the Detrended Price Oscillator (DPO) and applies Hull Moving Average (HMA) and Exponential Moving Average (EMA) smoothing to it. It also evaluates Relative Strength Index (RSI) levels. The script determines market state by comparing t

Indicator v4 Oscillators & momentumMoving averages
Updated 2 years ago · Apache-2.0 GitHub repository of ARI-DPO 2.0

Pivots HL

by btm2021
1 stars

A small indicator that finds confirmed pivot highs and pivot lows using a single length setting and labels each one as a higher high, lower high, higher low or lower low by comparing it with the previous pivot of the same kind. Labels are drawn on the price ch

Indicator v4 Support & resistance
Updated 2 years ago · None stated GitHub repository of Pivots HL

TrendChecker

by RobACurtis
1 stars

A Pine library that exports three functions, bullish, bearish and getTrend, which judge market direction on the current symbol and timeframe. Each call takes three switches to include a Stochastic RSI cross, a MACD line versus signal check and a comparison of

Library v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of TrendChecker
1 stars

This strategy trades mean-reversion bounces using Bollinger Bands and constructs JSON webhook payloads for automated execution. It opens a long position when the price crosses back above the lower band within a specified date filter and closes the position whe

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · MPL-2.0 GitHub repository of Bolinger Bands Strategy

MACD VWAP Supertrend

by kritarth2121
1 stars

This strategy combines a MACD crossover, a positive histogram, VWAP versus the open and a Supertrend direction change within the last few bars to open long trades. It closes the position when MACD crosses back under its signal line or Supertrend turns bearish.

Strategy v5 TrendOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of MACD VWAP Supertrend
1 stars

A strategy that enters long when the MACD histogram crosses above zero, price is above both EMAs and the Supertrend has just turned up. It enters short on the mirror conditions. Positions are reversed by the opposite signal, and the code has no separate stop l

Strategy v5 TrendOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of MACD & EMA & Supertrend Strategy
1 stars

A price-chart overlay that approximates a volume profile over a custom number of recent bars. On the last bar it finds the highest and lowest mid-price in the chosen range, divides that span into thirty price bands and counts how many bars fall into each. It t

Indicator v4 VolumeSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of Pseudo VPVR Custom Range

This indicator scans price charts to identify multiple classic bullish, bearish, and neutral candlestick patterns, including Hammers, Engulfing patterns, Dojis, Stars, and Marubozus. It evaluates prevailing market trends using simple moving average rules (SMA5

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Woverine - Candlestick Patterns

WoodwindVault

by govindthange
1 stars

A Pine v5 library that supplies auxiliary calculation functions for the author's Woodwind Playbook script. The visible part includes a function that works out the gains after a position is scaled down, taking entry, exit, quantity, remaining quantity and direc

Library v5
Updated 3 years ago · Custom licence GitHub repository of WoodwindVault
1 stars

An indicator in a separate pane that compares a symbol's performance with a reference symbol, set to a Polish index by default. Performance is measured over the four quarters of a year with the most recent quarter weighted more, and falls back to recent quarte

Indicator v5 Oscillators & momentum
Updated 3 years ago · GPL-3.0 GitHub repository of Relative Strength (IBD Style)

Stx Ma-Trend Finder

by arrabyte
1 stars

Plots one moving average on the price chart and colours it by slope strength. The average type can be SMA, EMA, HMA, RMA, WMA, SWMA, VWMA or TEMA, with adjustable length and source. The slope of each bar is compared with the largest slope seen so far; when it

Indicator v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of Stx Ma-Trend Finder

MPB2_0

by sourdiesel1202
1 stars

A Pine library that exports condition checks for long and short setups, selected by a position type string. The simple moving average check uses a 10-bar average and requires the close, and for longs the low, to sit on one side of it with a matching candle col

Library v5
Updated 3 years ago · None stated GitHub repository of MPB2_0

Bull Market Support Band

by krosenfeld7
1 stars

The Bull Market Support Band indicator overlays a higher-timeframe exponential moving average and simple moving average onto the price chart to visualize dynamic support or resistance zones. It calculates both moving averages using a user-defined timeframe res

Indicator v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Bull Market Support Band

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