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

Supertrend v2

by greenish7
1 stars

Combines a Supertrend line with a Stochastic RSI filter on the price chart. Supertrend uses an ATR period and multiplier on a chosen source and marks trend flips with buy and sell signals and highlighting. Separate long and short entry conditions require the S

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Supertrend v2

Shortingen Strasse

by eyusufatik
1 stars

An overlay that combines three studies into long and short signals: a Hull moving average in HMA, THMA or EHMA form shown as a trend-colored band, optionally from a higher timeframe, plus two QQE RSI-based momentum components and an oscillator with a short and

Indicator v4 Moving averagesOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Shortingen Strasse

Barbwire v1.0.0

by itmakesyousick
1 stars

Looks for barbwire zones, runs of bars with unusually small ranges, and boxes them on the price chart. It measures how small recent bars are using Heikin-Ashi data, scaled over a period with a level threshold and a minimum number of bars. Settings choose open

Indicator v5 Candlestick patternsVolatility & bands
Updated 4 years ago · None stated GitHub repository of Barbwire v1.0.0

My Script SMA 100

by nosscafe66
1 stars

A very small personal test script that plots a 100-period simple moving average of the close in a separate pane. The code contains a second indicator declaration and a basic condition comparing the previous close with that average, but no inputs, signals or ri

Indicator v5 Moving averages
Updated 4 years ago · None stated GitHub repository of My Script SMA 100
1 stars

A price-chart overlay that draws a moving average channel from a higher timeframe. It computes the moving average of the high, close and low on a chosen timeframe of 1 hour, 4 hours, daily, weekly or monthly, and plots them as three red lines. Settings pick th

Indicator v5 Moving averagesTrend Repaints
Updated 4 years ago · None stated GitHub repository of Switch using an expression
1 stars

A multi-tool overlay that bundles several classic studies on one chart, each with its own on/off switch. These include a blended BBI moving average colored by position against price, four configurable EMAs, Bollinger bands, parabolic SAR, zigzag with fib level

Indicator v5 TrendMoving averages
Updated 4 years ago · MIT GitHub repository of Victorinox by Illupute v1

Eth Strategy

by samliu0206
1 stars

This script aggregates spot and perpetual futures price data across multiple cryptocurrency exchanges to calculate a volume-weighted futures premium index. It computes the log ratio between perpetual futures and spot prices, applies a user-selected moving aver

Strategy v4 Moving averagesMean reversion
Updated 4 years ago · None stated GitHub repository of Eth Strategy
1 stars

A multi-study overlay that plots a triple exponential moving average, short SMAs, EMAs at 9, 20, 50, 100 and 200, and an ATR band around an EMA midline. It shades the background when the 9 and 20 EMAs cross and when the CCI moves back through plus or minus 100

Indicator v5 Moving averagesVolatility & bands
Updated 4 years ago · None stated GitHub repository of TEMA + 9 EMA + ATR + CCI + WR

RSI & Stochastic

by tkittich
1 stars

The script plots the Relative Strength Index and Stochastic oscillator indicators in separate panes. It calculates the RSI with customizable length, source, and MA type including Bollinger Bands, and the Stochastic oscillator with %K and %D periods. It draws o

Indicator v5 Oscillators & momentumVolatility & bands
Updated 4 years ago · None stated GitHub repository of RSI & Stochastic

0DTE IF

by tyler314
1 stars

This indicator simulates zero-day-to-expiration options trades by plotting scheduled entry and exit shapes directly on the price chart. It signals entries on Mondays, Wednesdays, and Fridays at a user-defined time when the VIX remains below a specified limit.

Indicator v5 Sessions & timeVolatility & bands
Updated 4 years ago · None stated GitHub repository of 0DTE IF

Hammers & Stars Strategy

by namdar-nejad
1 stars

This Pine v4 strategy trades hammer and shooting star candles on the price chart. Entry candles can be filtered by size relative to ATR and by an optional EMA, and a Fibonacci level defines how far into the candle the close must be. Stop loss is an ATR multipl

Strategy v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Hammers & Stars Strategy

Armonia de los MACD

by micayael
1 stars

A separate-pane indicator that plots a MACD with a simple-average signal line, colored by whether it is rising or falling around zero. On common timeframes it also plots a second MACD scaled up by a fixed multiplier toward a higher timeframe, drawn as circles.

Indicator v4 Oscillators & momentumTrend
Updated 4 years ago · None stated GitHub repository of Armonia de los MACD

This strategy draws a Donchian channel with a very long default period of 1440 bars, its midline and a 250-period simple moving average. It places limit orders to sell at the upper band after a high touches it and to buy at the lower band after a low touches i

Strategy v4 BreakoutMean reversion
Updated 4 years ago · MIT GitHub repository of Greeffer's Donchian Channel Strategy

Leo Supertrend

by kodtodya
1 stars

Leo Supertrend calculates and plots a Supertrend indicator alongside an Exponential Moving Average on the main price chart. It determines trend direction by tracking price relative to an ATR-based volatility band, supporting both standard RMA and simple moving

Indicator v4 TrendVolatility & bands
Updated 4 years ago · None stated GitHub repository of Leo Supertrend
1 stars

This trend-following strategy overlays fast and slow Hull Moving Averages, Parabolic SAR, Chaikin Money Flow, a Volume Oscillator, and Heikin Ashi candle confirmation on the main price chart. Long entries occur when price and fast HMA are above the slow HMA, S

Strategy v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of KRJ Swing HMA Volume Sar HA
1 stars

This strategy builds trades from two configurable moving averages, each selectable from eleven types with its own source, length, offset and ALMA settings. Optional modules add RSI-based take profit and stop levels and an ATR comparison as confirmation, and it

Strategy v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of All Moving Average Strategy

The script calculates two exponential moving averages with 21 and 34 periods and plots them on the price chart. It fills the area between them in a color that changes from green to red based on whether the fast MA is above the slow MA. This creates support ban

Indicator v5 Moving averagesTrend Archived
Updated 4 years ago · MPL-2.0 GitHub repository of MehdiJangjou - BullMarket Support Type 2

Stoch Strat

by GoatGodXBT
1 stars

Stoch Strat is an overlay trading strategy that combines Stochastic Oscillator crossovers, MACD histogram momentum, and 50/100 Exponential Moving Averages for trend filtering. It generates long signals when Stochastic crosses up in oversold conditions while pr

Strategy v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Stoch Strat

Risk

by tseitz
1 stars

An indicator in a separate pane that estimates a normalised risk metric between 0 and 1. It takes the log distance between price and its 365 period simple moving average, scales it by the bar index raised to a power, then normalises it against the running high

Indicator v5 Volatility & bands
Updated 4 years ago · None stated GitHub repository of Risk

This indicator is an unfinished attempt to reproduce Binance's BTCUSDT perpetual funding rate in a separate pane. It requests the Binance premium index on a one-minute basis, builds a weighted average over each eight-hour funding period, and adds a clamped int

Indicator v5 Repaints
Updated 4 years ago · None stated GitHub repository of Binance Premium Index and Funding Rate

MA+ADX+DMI

by fifiteen82726
1 stars

Plots a fast and a slow simple moving average on the price chart and shades the area between them. A buy highlight appears when the fast average crosses above the slow one while the positive directional index is above the negative and ADX is above a key level.

Indicator v4 TrendMoving averages
Updated 5 years ago · None stated GitHub repository of MA+ADX+DMI
1 stars

A Pine v4 overlay that draws a volume profile on the price chart. Volume over a lookback window is split into price bins and shown as horizontal bars, with an optional point of control line at the busiest level. Settings control lookback depth up to 1000 bars,

Indicator v4 VolumeSupport & resistance
Updated 5 years ago · None stated GitHub repository of Volume Profile + 3EMA

Donchian Ichimoku Hybrid

by rocketbrainsurgeon
1 stars

This indicator builds a Donchian channel with midlines between the extremes, then uses Ichimoku-style logic to classify the market as trending up, trending down or ranging. Bars are coloured green, red or gray and the zones near the basis are shaded. An option

Indicator v4 TrendBreakout
Updated 5 years ago · GPL-3.0 GitHub repository of Donchian Ichimoku Hybrid

Commercial Strategy

by AnimaLibera
1 stars

This Pine v4 strategy is built on the weekly CFTC net position of commercial traders in commodity or financial futures, requested by contract code from an external Quandl data feed. It scales the net position within its three-year range into an index, and trea

Strategy v4
Updated 5 years ago · Custom licence GitHub repository of Commercial Strategy

Databox

by rosskevin
1 stars

Databox is an overlay indicator that fetches and displays fundamental financial data directly on the main price chart. It retrieves key corporate metrics such as book value per share, cash and equivalents, total shares outstanding, stock buyback yield, and qua

Indicator v4 Screeners & dashboards
Updated 5 years ago · AGPL-3.0 GitHub repository of Databox

BTCNOK

by taco-c
1 stars

This indicator plots the Bitcoin price in Norwegian kroner on the price chart. It multiplies a Bitcoin quote in USD or EUR by the matching dollar or euro to NOK rate, both requested on the one-minute timeframe. The Currency input switches the Bitcoin and forei

Indicator v4
Updated 5 years ago · MPL-2.0 GitHub repository of BTCNOK

War Zone Control

by CriptomonedasRentables
1 stars

War Zone Control calculates a fast Exponential Moving Average (EMA) and a slow Weighted Moving Average (WMA) using the selected price source. It plots both moving averages directly on the price chart. When the fast EMA crosses above the slow WMA, it displays a

Indicator v4 TrendMoving averages
Updated 5 years ago · None stated GitHub repository of War Zone Control
1 stars

A standard Relative Strength Index drawn in a separate pane, calculated with Wilder smoothing over an adjustable length and source. It includes horizontal lines at 70, 30 and an added middle line at 50, with the area between 70 and 30 shaded. It is a plain osc

Indicator v4 Oscillators & momentum
Updated 5 years ago · GPL-3.0 GitHub repository of Relative Strength Index by TH

DMI

by digasic
1 stars

This indicator calculates and displays the Directional Movement Index (DMI) and Average Directional Index (ADX) in a separate pane below the price chart. It measures directional price movements by computing the positive directional indicator (+DI), negative di

Indicator v4 TrendOscillators & momentum
Updated 6 years ago · None stated GitHub repository of DMI

MACD Rise and Fall

by RayRuizheLi
1 stars

This strategy calculates the MACD line and plots it as a colored histogram in a separate pane. Instead of traditional crossovers, it tracks consecutive rising or falling values on the MACD line. It enters long positions after a configurable number of consecuti

Strategy v4 Oscillators & momentumMoving averages
Updated 6 years ago · None stated GitHub repository of MACD Rise and Fall
1 stars

This indicator plots Bitcoin network hash-rate moving averages in a separate pane. It requests daily hash rate, applies a short and a long simple moving average, and can draw them as ribbons or as an oscillator. Optional markers show miner capitulation when th

Indicator v4 Moving averagesTrend Repaints
Updated 6 years ago · GPL-3.0 GitHub repository of Bitcoin Hash Ribbons

Kal's MTF OBV HAAR

by chipmaker
1 stars

Kal's MTF OBV HAAR is an indicator that plots OBV EMAs with lengths 9 and 4 on a separate pane to highlight volume trends. It calculates CCI with length 10 and CMF with length 10, using crossovers and crossunders of the CCI line at zero for up and down signals

Indicator v4 TrendOscillators & momentum Repaints
Updated 6 years ago · None stated GitHub repository of Kal's MTF OBV HAAR
948 stars

Calculates the Corrected Moving Average (CMA) alongside a standard Simple Moving Average (SMA) over a specified period. The indicator dynamically adjusts the average based on sample variance and deviation from price. Both lines plot directly on the price chart

Indicator v6 Moving averagesTrend
Updated 11 days ago · GPL-3.0 GitHub repository of Corrected Moving Average
575 stars

This indicator scans multiple stock symbols for ICT Displacement Candles. It detects strong price moves characterized by long candles and minimal wicks that exceed a minimum bar count and a set deviation percentage from average range. Signals for bullish and b

Indicator v6 Screeners & dashboardsSMC / ICT / price action
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Displacement Candles Scanner

This trend-following strategy executes a classic Donchian channel breakout system designed to cross-validate backtest results against external framework benchmarks. It triggers a long entry when the closing price breaks above the highest high of the prior entr

Strategy v6 BreakoutTrend
Updated yesterday · AGPL-3.0 GitHub repository of Forven S01509 - Simple Donchian 20/10 Breakout
330 stars

This strategy calculates Bollinger Bands and Aroon oscillator values to identify mean-reversion opportunities. It enters a long position using full equity when the closing price crosses below the lower Bollinger Band while Aroon Up remains above a user-specifi

Strategy v5 Mean reversionVolatility & bands
Updated 2 months ago · None stated GitHub repository of Bollinger bands + Aroon [Alorse]

This indicator identifies and plots key options expiration dates on the price chart. It calculates monthly OpEx (the third Friday of each month), quarterly OpEx (March, June, September, December), and corresponding VIX expiration dates, drawing vertical lines

Indicator v6 Sessions & time
Updated 2 months ago · MIT GitHub repository of Expiration Highlights: Opex, Quarterly Opex & VIX with Vanna/Charm

2618-Tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest purchases and sales of ticker 2618 on the price chart. When the ETF input is ALL, it places green Buy labels below bars and red Sell labels above bars on fixed calendar dates, with an X1 mark for the recorded

Indicator v4
Updated 2 years ago · None stated GitHub repository of 2618-Tracker
285 stars

Mean Reversion Study is an indicator that identifies trade setups combining exponential moving averages, RSI extremes, and engulfing candlestick patterns. It highlights bullish setups when a bullish engulfing candle forms below the EMA while RSI is oversold, a

Indicator v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Study

AIActivationFunctionsSigmoid

by ricardosantos79
261 stars

AIActivationFunctionsSigmoid is a utility library for Pine Script v5 that provides mathematical calculations for the sigmoid activation function, commonly used in artificial intelligence and machine learning algorithms. The library exports functions to evaluat

Library v5 AI / machine learning
Updated 4 years ago · None stated GitHub repository of AIActivationFunctionsSigmoid
257 stars

This strategy plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos

Strategy v6 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Best Chart 1m Strategy Candle Bar
219 stars

Candlestick - Inside Bar Pattern is an overlay indicator that identifies inside bar setups across three consecutive candles. It detects when the price range of the preceding bar is completely contained within the range of the bar prior to it. The direction of

Indicator v5 Candlestick patternsBreakout
Updated 1 year ago · None stated GitHub repository of Candlestick - Inside Bar Pattern

Deduct

by TaichiS
219 stars

This indicator displays moving average deduction reference points directly on the price chart. It plots dynamic labels on historical bars corresponding to short, medium, and long lookback periods, defaulted to 20, 60, and 120 bars. Each text label displays the

Indicator v4 Moving averagesSupport & resistance
Updated 5 years ago · None stated GitHub repository of Deduct
218 stars

This indicator plots a customizable horizontal price line directly on the price chart and displays dynamic distance metrics, including ticks, dollars, and points relative to the current close. It monitors price interactions to trigger cross alerts and construc

Indicator v6 Support & resistance
Updated 3 months ago · None stated GitHub repository of Advanced Order Line with TradersPost
193 stars

This strategy calculates a chart-timeframe MACD oscillator alongside a higher-timeframe Simple Moving Average (SMA) trend filter using security requests. It triggers long signals when the MACD line crosses above its signal line while the higher-timeframe price

Strategy v6 TrendOscillators & momentum
Updated yesterday · Apache-2.0 GitHub repository of PineForge MTF Tutorial — HTF SMA Filter

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