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

EzAlgo

by TamTH-Dev
2 stars

EzAlgo is a multi-purpose trading overlay that combines several technical analysis tools into one system. It calculates Ichimoku Cloud components, dynamic support and resistance zones, reversal bands, trend ribbons, and custom buy or sell signals adjusted by s

Indicator v5 TrendSupport & resistance
Updated 5 weeks ago · None stated GitHub repository of EzAlgo

Mirpapa_Lib_Unicorn

by alvinng214
2 stars

The Mirpapa_Lib_Unicorn library defines data structures and logic for the Unicorn pattern within smart money concepts trading. It creates UnicornData types that track order blocks, fair value gaps, their overlaps into Unicorn zones, CHoCH confirmations, retest

Library v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Mirpapa_Lib_Unicorn

Alpy VIX

by avatar-lavventura
2 stars

Calculates the synthetic Williams VIX Fix indicator in a separate pane to detect market bottoms and volatility spikes. It computes standard deviation bands and percentile boundaries over customizable lookback periods, coloring histogram bars when volatility re

Strategy v4 Volatility & bandsMean reversion Repaints
Updated 7 months ago · None stated GitHub repository of Alpy VIX

This indicator plots several linear regression channels on the price chart. Each channel can be hidden or drawn as a channel, bands, or both, and its lookback is anchored to price, volume, oscillator extremes, calendar periods, sessions, or corporate events. P

Indicator v6 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Multi-Anchored Linear Regression Channels [TANHEF]

Exponential Weighted MA Volatility

by mushroom-men-Trading
2 stars

This indicator calculates exponentially weighted moving average volatility from log returns of a chosen price source and plots the result in a separate pane. Squared returns are smoothed with an RMA-style weighting, bias-corrected, then converted to volatility

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Exponential Weighted MA Volatility

Banmuxia MACD Divergence

by wynnforthework
2 stars

This strategy calculates a customizable MACD oscillator and histogram using either simple or exponential moving averages. It identifies pivot highs and pivot lows on the MACD histogram to detect momentum divergences against price action. Historical pivot point

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Banmuxia MACD Divergence

2.Draw - 11.Labels

by Web3Degenerate
2 stars

This overlay indicator draws a single price label on the chart at the current bar's index and low. The label lists the bar's close, open, high, and low. Its color is green when the close is above the open and red otherwise, then switches to purple when the low

Indicator v5
Updated 2 years ago · None stated GitHub repository of 2.Draw - 11.Labels
1 stars

An indicator that builds a feature matrix from price z-score, RSI, ATR ratio and momentum over a lookback window, weights the four features, smooths them with a covariance based decomposition, and classifies a regime. It then draws a forecast line a chosen num

Indicator v5 AI / machine learningVolatility & bands
Updated yesterday · None stated GitHub repository of JINXAI Tensor Forecast

Signal Forge

by jayadevrana
1 stars

Signal Forge is a trend-following overlay indicator that combines an ATR trailing stop with a customizable Exponential Moving Average trend filter. It plots dynamic trailing stop lines and colors bars based on whether price action aligns with the EMA baseline.

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MPL-2.0 GitHub repository of Signal Forge

SMC Session Context

by skipp-dev
1 stars

SMC Session Context is an indicator that tracks trading sessions across Tokyo, London, and New York time zones. Operating in a separate pane, it monitors session highs and lows, previous session extremes, cumulative volume, and initial opening ranges. It ident

Indicator v6 Sessions & timeSMC / ICT / price action
Updated 3 days ago · None stated GitHub repository of SMC Session Context

HMA Crossover

by pineforge-4pass
1 stars

A moving average crossover strategy using two Hull Moving Averages. It enters long when the fast HMA crosses above the slow HMA and short when it crosses below, reversing the position each time. Both lengths are adjustable, and both lines are drawn on the pric

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of HMA Crossover

P_err_recursion

by GammaExpansion
1 stars

This Pine Script v6 indicator defines a recursive factorial function and plots the computed output of factorial five in an indicator pane. The script implements a basic mathematical recursion pattern where a function calls itself until reaching a base conditio

Indicator v6
Updated 6 days ago · MIT GitHub repository of P_err_recursion
1 stars

A trend continuation strategy that filters setups with ADX, rate of change, smoothed balance of power, an ATR expansion band, EMA 20 and 50 alignment and DI alignment. Entries can use pullback and reclaim, breakout or liquidity sweep triggers, with limits on e

Strategy v6 TrendVolatility & bands Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of LMSE-Lite Trend Continuation Risk Engine

DEPV2 DEBUG S11

by YuceSezar89
1 stars

This indicator processes signals across multiple cryptocurrency symbols including BTCUSDT, ETHUSDT, SOLUSDT, and additional Binance pairs. It evaluates trend, momentum, volatility, and volume methods to generate trading signals. Four signal modes are available

Indicator v6 TrendOscillators & momentum Repaints
Updated 12 days ago · None stated GitHub repository of DEPV2 DEBUG S11
1 stars

This indicator draws geometric ruler lines on the price chart from a user-chosen base time. It stores confirmed pivot highs and lows using left and right bar counts, and can use highs, lows, or both. Settings set colors and width for upper-shadow, lower-shadow

Indicator v6 Support & resistanceVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of Ruler V2 Morindok by BITMOON618

Volatility Adjusted Cloud

by vedkanani123
1 stars

An overlay indicator that draws a cloud around a VIDYA, a volatility-adaptive moving average. Cloud width comes from the standard deviation of price over a history window, with separate positive and negative multipliers for the upper and lower edges. The cloud

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Volatility Adjusted Cloud

Draws volume order block zones with asymmetric signals on the price chart, then adds a proximity layer that checks how close those signals sit to high-volume, displacement and tier conditions. Version 1 is a tick-friendly build. It is an indicator only.

Indicator v6 SMC / ICT / price actionVolume
1 stars

A strategy that trades a 10 and 21 period EMA crossover, going long on a cross up and short on a cross down. Each entry has an ATR-based stop, 2.5 times ATR by default, and a profit target at 2.5 times the stop distance. Position size comes from a chosen risk

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of TN Adaptive Risk Matrix

GitLemon Trailer

by GreyssonEnterprises
1 stars

An indicator that searches for W and M reversal shapes in price and optionally in OBV, Williams %R, MFI, RSI and directional movement, using one shared maximum width and offset. It can also test whether price sits within a Fibonacci retracement zone of the rec

Indicator v4 DivergenceOscillators & momentum
Updated 2 months ago · MIT GitHub repository of GitLemon Trailer

Trade Worthy

by rubbermetal
1 stars

Trade Worthy is a large multi-tool overlay indicator written in Pine v5. It shows a configurable dashboard of indicator readings, volume information and stats, with Pi moving averages on by default. Many other layers are off by default and can be switched on,

Indicator v5 Screeners & dashboardsMoving averages
Updated 4 months ago · MPL-2.0 GitHub repository of Trade Worthy

Pivot Trend RMA

by Snappni
1 stars

This strategy calculates a 10-period rolling moving average (RMA) alongside short-term pivot highs and pivot lows to identify trend alignment. It plots the RMA line directly on the price chart. Long entries trigger when price crosses the RMA while the RMA is r

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Pivot Trend RMA

Goertzel Algorithm

by mikeyhu70
1 stars

This indicator applies the Goertzel algorithm, a signal-processing method for measuring a single frequency component, to price in a separate pane. A period length and a measurement block length set the cycle to test, and a training percentage and shift setting

Indicator v5 AI / machine learning
Updated 6 months ago · None stated GitHub repository of Goertzel Algorithm
1 stars

This overlay strategy combines SuperTrend, ADX, OBV, MACD, directional movement, EMA, and a volatility filter to open long or short trades sized as a percent of equity. Each filter and each side can be switched off. Users set EMA lengths, DI length, volatility

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Percentile_SuperTrend_OBV&DI&EMA

Momentum Breakout

by knectardev
1 stars

Momentum Breakout is an overlay strategy that identifies trading opportunities using Bollinger Bands breakout logic. It enters trades when price breaks out of the volatility bands without applying additional volume filtering. Risk management is handled through

Strategy v5 BreakoutVolatility & bands
Updated 9 months ago · None stated GitHub repository of Momentum Breakout

V5 Combination by YZZ

by webcrack4
1 stars

This indicator combines multiple technical tools into a single price chart overlay, designed to optimize space and indicator limits. It features an overlay MACD visualizer with selectable calculation methods (Traditional, AS Histogram, Leader, or Source), cust

Indicator v5 TrendOscillators & momentum
Updated 9 months ago · None stated GitHub repository of V5 Combination by YZZ

For Loop Examples

by ivansoft
1 stars

Small teaching script showing how for loops work in Pine. One plot counts how many of the previous bars closed above the current close over a 14-bar lookback, and a second plot sums array elements using a loop step of five. It appears in a separate pane and ha

Indicator v6
Updated 1 year ago · None stated GitHub repository of For Loop Examples
1 stars

A strategy that trades from a linear regression channel combined with three moving averages (base, slow and fast). It can take long and short deals, requires a minimum channel width, and sizes orders either as a share of equity or a fixed quantity. Exits scale

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of LinReg Quick Strategy

Trendlines - JD

by nvFede
1 stars

A Pine v4 overlay by Joris Duyck that draws trendlines through pivot points and extends them forward. Lines can start from wicks or candle bodies, run indefinitely or for a limited number of bars, and be coloured by direction or in monochrome. Trendline breaks

Indicator v4 Support & resistanceTrend Repaints
Updated 3 years ago · None stated GitHub repository of Trendlines - JD

SMR

by JohnsonHsiao
1 stars

This indicator calculates a triple-smoothed Relative Strength Index oscillator and displays it in a separate pane. It evaluates momentum by applying the RSI calculation iteratively across three stages using a user-defined period. The script plots the resulting

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of SMR

MACD Cross 2

by tseitz
1 stars

A long-biased Pine v4 strategy using a 12/26 MACD with a nine-period signal. It goes long on a green candle after three rising MACD bars below zero with MACD above signal, and short on the falling mirror. A percentage take-profit above the average entry closes

Strategy v4 Oscillators & momentumVolume Repaints
Updated 4 years ago · None stated GitHub repository of MACD Cross 2

Calculates an Elastic Volume Weighted Moving Average (EVWMA), incorporating trading volume to dynamically adjust moving average responsiveness over a specified lookback length. It plots directly on the price chart as a single moving average line. Optional colo

Indicator v4 Moving averagesVolume
Updated 11 days ago · GPL-3.0 GitHub repository of Elastic Volume Weighted Moving Average
330 stars

This indicator calculates the MACD oscillator from a configurable source with fast and slow lengths, then plots the histogram, MACD line, and signal line in a separate pane. It detects regular bullish divergences (price lower lows with oscillator higher lows),

Indicator v5 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of MACD + Divergences [Alorse]

AMD-tracker

by Allen1212
303 stars

This indicator plots historical buy and sell transactions executed by ARK Invest funds directly onto the price chart for Advanced Micro Devices. It creates visual labels at specific historical timestamps, marking buys below bars in green and sells above bars i

Indicator v4
Updated 2 years ago · None stated GitHub repository of AMD-tracker

FunctionArrayMovingAverage

by ricardosantos79
261 stars

This Pine Script v5 library provides an exported function to calculate moving averages directly over float arrays. Users can supply a sample array, set the smoothing length, choose whether to omit initial values prior to reaching the lookback window, and speci

Library v5 Moving averages
Updated 4 years ago · None stated GitHub repository of FunctionArrayMovingAverage

NQU2023-10M V1

by dearvn
257 stars

The NQU2023-10M V1 strategy calculates 3-period simple moving averages of high and low prices alongside 3-bar price action patterns to detect short-term swings and trend reversals. It enters long or short trades when price action confirms a trend change condit

Strategy v5 TrendMoving averages
Updated 6 weeks ago · None stated GitHub repository of NQU2023-10M V1
218 stars

This indicator maps market structure and supply and demand zones on the price chart. It marks validated and optional unvalidated swing highs and lows using a pivot length and extra confirmation bars. Consolidation and impulse moves are measured against ATR to

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Market Structure + Supply/Demand
114 stars

Polarized Fractal Efficiency plots a custom efficiency oscillator in a separate pane. It compares net price movement over a lag with the path of successive moves, signs the result by recent direction, and smooths it with an exponential moving average. Readings

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Polarized Fractal Efficiency
106 stars

Adaptive Price Channel Strategy combines Donchian-style high/low channels with Average Directional Index (ADX) and ATR-based volatility offsets. It evaluates trend strength and directional movement to trigger entries when price crosses ATR-adjusted upper or lo

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Adaptive Price Channel Strategy

This indicator plots the binomial cumulative distribution function in a separate pane. It min-max normalizes the selected source over a lookback window into a probability between zero and one, then sums the chance of k or fewer successes across n trials. Log-g

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Binomial Distribution CDF (BINOMDIST)

V5 Concepts Alerts 09

by be-thomas
65 stars

This indicator calculates a 14-period relative strength index and detects when that oscillator crosses above 50. It defines an alert condition whose message includes the current RSI value through a plot placeholder. The RSI series is plotted with display set t

Indicator v5 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of V5 Concepts Alerts 09

Auto Pivot Trendlines

by dcaoyuan
55 stars

This indicator draws trendlines between confirmed swing points on the price chart. It finds pivot highs and pivot lows with a fixed ten-bar lookback on each side, then connects successive highs with red lines and successive lows with green lines. There are no

Indicator v5 Support & resistanceTrend
Updated 6 months ago · Apache-2.0 GitHub repository of Auto Pivot Trendlines
47 stars

This indicator plots an Endpoint Moving Average on the price chart. It calculates a linearly weighted average of the selected source over a lookback window, assigning the largest weight to the newest bar and smaller weights to older bars. The period input sets

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Endpoint Moving Average (EPMA)

Confluence Suite

by TamaraKGreen
46 stars

The Confluence Suite indicator draws multiple trading signals and tools directly on the price chart. It generates entry and exit signals based on selected modes and filters, with an AI signal classifier rating quality from 1-4. Additional features include smar

Indicator v5 TrendSMC / ICT / price action
Updated 7 weeks ago · None stated GitHub repository of Confluence Suite

Choppiness Index

by TWODS-CAPITAL
37 stars

Choppiness Index is a volatility and trend indicator that measures whether a market is consolidating or trending directionally. It calculates the ratio of the true range sum over a specified period to the highest and lowest price range, scaled logarithmically

Indicator v5 Volatility & bandsTrend
Updated 3 years ago · MIT GitHub repository of Choppiness Index
16 stars

A Donchian channel trend-following strategy featuring progressive breakeven stop-loss levels based on ATR (N). It enters on a 55-period Donchian breakout with an initial risk set at 2.0 N. As profit reaches key ATR milestones, the stop advances through progres

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 33: Progressive BE

EnlargedBodies A002

by ruckard
13 stars

This strategy executes trend-following trades directly on the price chart based on consecutive expanding candle bodies filtered by the 13-period exponential moving average. When price is above the EMA13, it enters long positions after three consecutive bullish

Strategy v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of EnlargedBodies A002

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