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

AYX-tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest purchases and sales of AYX on the price chart. It places green buy labels below the bar and red sell labels above the bar at fixed calendar dates, each labeled with an X1 count. The only input selects the ETF

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

MathComplexTrignometry

by ricardosantos79
261 stars

MathComplexTrignometry is a Pine Script library that provides trigonometric operations for complex numbers represented as float arrays. It implements standard, hyperbolic, arc, and hyperbolic arc trigonometric functions such as sinh, cosh, and tanh. As a devel

Library v5
Updated 4 years ago · None stated GitHub repository of MathComplexTrignometry

Rotating Quotes

by TradersPost
218 stars

Rotating Quotes displays customizable trading psychology quotes and reminders in a table widget in a separate pane. It cycles through a pipe-separated list of quotes at a user-defined time interval, either sequentially or in random order. User inputs allow ful

Indicator v6 Screeners & dashboards
Updated 3 months ago · None stated GitHub repository of Rotating Quotes

AAPP

by capissimo
114 stars

This indicator plots an adaptive moving average or scaled RSI divergence line directly on the price chart. It calculates dual RSI series to measure momentum divergence, scales the values to the chart's price range, and constructs an adaptive average filtered b

Indicator v4 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of AAPP
106 stars

Calculates a momentum squeeze using Bollinger Bands and Keltner Channels alongside a trend-filtering moving average. It generates long and short entries based on squeeze momentum bar conditions and an optional pre-squeeze dot count filter. Exits can trigger on

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Athena Momentum Squeeze - Autoview
99 stars

This indicator calculates the Commodity Channel Index in a separate pane. It forms typical price from high, low, and close, tracks a simple moving average with a circular buffer, and divides the price deviation by a scaled mean absolute deviation. The Length i

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Commodity Channel Index (CCI)

array.slice()

by be-thomas
65 stars

This educational indicator demonstrates the behavior of shallow copies created by the array.slice function in Pine Script. On the final bar of the chart, it initializes a float array, generates a slice, and demonstrates how modifying the parent array or its sl

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of array.slice()

The HT_SINE indicator calculates the Hilbert Transform SineWave and LeadSine components based on the dominant cycle of a selected price source. Using in-phase and quadrature signal processing along with a custom atan2 implementation, it measures the phase of t

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of HT_SINE: Hilbert Transform - SineWave

NQ Statistical Mapper

by TamaraKGreen
46 stars

NQ Statistical Mapper plots key trading sessions including New York, London, and Asia directly on the price chart. It visualizes session high and low ranges, displays configurable session and intraday levels, and presents session performance metrics in an on-s

Indicator v5 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of NQ Statistical Mapper
37 stars

This indicator detects the bearish Downside Tasuki Gap candlestick pattern on the price chart. It looks for a long red candle, a smaller red candle that gaps below it, and a green candle that closes inside that gap without filling it, while price is in a downt

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Downside Tasuki Gap - Bearish
16 stars

This strategy implements a Donchian breakout trend-following system with sector-adaptive profit targets and ATR-based volatility sizing. It enters positions on Donchian channel breakouts, pyramiding additional units at ATR increments up to a configurable maxim

Strategy v6 BreakoutTrend
Updated 12 months ago · None stated GitHub repository of Seykota Alt 46: Sector Adaptive

Knn Filter A007

by ruckard
13 stars

Knn Filter A007 is a strategy that applies a K-Nearest Neighbors classification algorithm to evaluate historical feature performance and filter out low-probability trade setups. It executes long and short entries based on learned historical patterns. Risk mana

Strategy v5 AI / machine learningVolatility & bands
Updated 1 year ago · None stated GitHub repository of Knn Filter A007

This indicator evaluates how price relates to one selected moving-average family rather than treating a crossover as a signal. It scores trend quality, historical respect of the average, extension, compression, acceleration, and exhaustion, then plots a relati

Indicator v6 TrendMoving averages
Updated 2 days ago · MIT GitHub repository of Market–Average Relationship Engine [WavesUnchained]

Delta Hedging Pressure

by eddiebelaval
7 stars

Delta Hedging Pressure estimates directional market bias using a volume-weighted delta calculation plotted in a separate pane. It multiplies candle volume by bar direction (positive for bullish closes and negative for bearish closes) to compute directional pre

Indicator v6 Volume
Updated 3 months ago · None stated GitHub repository of Delta Hedging Pressure
6 stars

Apex Protocol v3.0 - The SMC Engine is an overlay indicator designed for Smart Money Concepts market structure analysis. It identifies and plots Break of Structure (BOS) and Market Structure Shift (MSS) markers, Fair Value Gaps (FVG), Order Blocks (OB), and se

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · None stated GitHub repository of Apex Protocol v3.0 - The SMC Engine

This overlay strategy enters long when regular or hidden bullish RSI divergence forms between price lows and RSI pivot lows. A regular signal needs a lower price low with a higher RSI low, and a hidden signal needs a higher price low with a lower RSI low, both

Strategy v4 Oscillators & momentumDivergence
Updated 3 years ago · Apache-2.0 GitHub repository of RSI Divergence Long Strategy (Not Good)

Stoch RSI [trugurpala]

by trugurpala
4 stars

Calculates and plots the Stochastic RSI oscillator in a separate pane using customizable RSI, Stochastic, and SMA smoothing lengths for %K and %D lines. It generates bullish crossover signals when %K crosses above %D in oversold territory below 20, and bearish

Indicator v6 Oscillators & momentum
Updated 2 months ago · MIT GitHub repository of Stoch RSI [trugurpala]
3 stars

DEBUG Lower TF Supertrend calculates a modified trailing Supertrend line and trend direction based on average true range bands applied around the bar mid-price. The custom function supports multiple moving average types, such as HMA, EMA, SMA, WMA, and VWMA, t

Indicator v5 TrendVolatility & bands
Updated 5 months ago · None stated GitHub repository of DEBUG Lower TF Supertrend
2 stars

This indicator detects market structure breaks using a configurable ZigZag length to identify swing highs and lows. It marks bullish and bearish order blocks along with breaker blocks on the price chart. Breakouts are confirmed via a Fibonacci retracement fact

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Market Structure Break & Order Block

VWMA_WF

by avatar-lavventura
2 stars

VWMA_WF plots a 24-period volume-weighted moving average of the 60-minute hlc3 price on the chart, plus percentage offset bands. It draws a long label when price is at or below the lower band and a down fractal is confirmed, and it sends a short alert when pri

Indicator v4 Moving averagesVolume Repaints
Updated 7 months ago · None stated GitHub repository of VWMA_WF

Linear Time Moving Average (LTMA)

by mushroom-men-Trading
2 stars

This indicator calculates a linear time-weighted moving average of a chosen price source and plots it on the price chart. Inside the lookback, each bar receives a weight that rises with recency, equal to the period minus its offset, and the result is the weigh

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Linear Time Moving Average (LTMA)

Q-Trend Strategy

by wynnforthework
2 stars

Q-Trend Strategy builds a midpoint from the highest and lowest source values over a trend period and shifts it by an ATR band. It enters long when the source crosses or remains above the upper band and short when it crosses or remains below the lower band. Typ

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Q-Trend Strategy

FTB Strategy

by Web3Degenerate
2 stars

The FTB Strategy is a short-only overlay strategy targeting EURUSD during the European session from 0200-0700. It enters short positions when filters confirm RSI overbought, a bullish prior bar close, or a high price level within lookback bars, combined with a

Strategy v5 Mean reversionSessions & time
Updated 2 years ago · None stated GitHub repository of FTB Strategy
1 stars

This strategy plots market structure on the price chart from confirmed swing highs and lows and flags breaks of those levels. Breaks can use the wick or the close, and structure logic can stay standard or include sweeps. ChoCH mode selects Ping, Verify, or bot

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 3 days ago · None stated GitHub repository of CHOCH-Strategy (Structure Only)

MTF Array Stats

by pineforge-4pass
1 stars

MTF Array Stats is a multi-timeframe strategy created as an engine validation probe. It collects daily close prices into a rolling 20-element array buffer. Using array functions, it calculates the median and percentile rank of the latest daily close relative t

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of MTF Array Stats

P_fmt_comments

by GammaExpansion
1 stars

This indicator is a Pine Script v6 parser fixture rather than a trading signal. It defines a function that doubles its numeric input, stores a string that looks like a comment, and plots the doubled close plus the length of that string in a separate pane. Trai

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

An overlay indicator that tracks Asia, London and New York sessions in a chosen timezone and classifies how the day is developing into numbered profiles. It adds opening range boxes, previous day high and low sweeps, higher-timeframe market structure, a TDI an

Indicator v6 Sessions & timeSupport & resistance Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of Session Profile + Trading Coach Merged

DEPV2 DEBUG S26

by YuceSezar89
1 stars

This indicator generates trading signals for multiple cryptocurrency symbols using four methods: trend, momentum, volatility, and volume. It supports three signal modes - single method, simultaneous confirmation requiring a minimum number of agreeing methods,

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

A strategy for gold futures based on the initial balance, the high and low of a set New York time window that starts at 9:30 and ends at 10:30 by default. Ranges outside a minimum and maximum percent of price are skipped. After price breaks the range, it waits

Strategy v6 BreakoutSessions & time
Updated 2 months ago · None stated GitHub repository of TN Gold IB Retracement

Squeeze Trailer

by GreyssonEnterprises
1 stars

A Pine v4 indicator built around a TTM-style squeeze, comparing Bollinger Bands with Keltner Channels to flag low-volatility compression and the breakout that follows. It then derives entry, stop and target levels from an entry source, a stop source with a per

Indicator v4 Volatility & bandsBreakout
Updated 2 months ago · MIT GitHub repository of Squeeze Trailer

A Pine Script v5 indicator in a separate pane, version A4.0 of a Hurst spectral oscillator. The hl2 source, changeable in the settings, is requested with lookahead on and filtered with bandpass filters covering cycles from 1 day to 18 years. Each cycle can be

Indicator v5 Oscillators & momentum Repaints
Updated 6 months ago · None stated GitHub repository of Hurst Spectral Analysis Oscillator A4.0
1 stars

This indicator scans multiple technical indicators—including MACD, RSI, Stochastic, CCI, Momentum, OBV, VWMA, CMF, and MFI—to detect regular and hidden divergences against price pivot points. It overlays divergence lines and labels directly on the price chart

Indicator v4 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Divergence for Many Indicators yzz
1 stars

A strategy that trades breaks of swing points. It detects pivot highs and pivot lows using left and right bar counts, then places a long stop order one tick above the latest pivot high and a short stop order one tick below the latest pivot low. A pending order

Strategy v6 BreakoutSupport & resistance
Updated 1 year ago · None stated GitHub repository of Pivot Reversal Strategy
1 stars

A long-only Pine v4 strategy built on a 12/26 MACD with a nine-period signal line. It enters on a green candle when the MACD has risen for three consecutive bars while still below zero and above its signal line. It closes when the opposite falling-MACD conditi

Strategy v4 Oscillators & momentum Repaints
Updated 4 years ago · None stated GitHub repository of RPLWETH Uniswap MACD Strategy

Money Flow Index

by everget
948 stars

Calculates the standard Money Flow Index (MFI) oscillator alongside an exponential moving average signal line in a separate pane. The script visually highlights trend conditions through dynamic ribbon filling, optional difference histogram bars, and overbought

Indicator v4 Oscillators & momentumVolume
Updated 11 days ago · GPL-3.0 GitHub repository of Money Flow Index
330 stars

Heikin Ashi Strategy V2 [Alorse] is a trend-following strategy that generates trading signals using multi-timeframe Heikin Ashi moving average crossovers. It calculates a fast and slow exponential moving average from higher-timeframe Heikin Ashi close data and

Strategy v4 TrendMoving averages Repaints
Updated 2 months ago · None stated GitHub repository of Heikin Ashi Strategy V2 [Alorse]

BA-tracker

by Allen1212
303 stars

BA-tracker is an overlay indicator that marks historical ARK Invest purchases and sales of Boeing on the price chart. Green labels appear below bars on buy dates and red labels appear above bars on sell dates, with text showing the side and how many ARK ETFs t

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

MathConstants

by ricardosantos79
261 stars

This Pine Script v5 library exports frequently used mathematical constants as functions that return fixed numeric values. It includes e, pi, natural and base-10 logarithms of e, 2, 10 and pi, square roots of e, 2, 3 and pi, and related products and inverses su

Library v5
Updated 4 years ago · None stated GitHub repository of MathConstants

RSI Basic Template

by TradersPost
218 stars

This indicator plots a classic Relative Strength Index in a separate pane. It calculates RSI from a chosen price source and length, then draws dashed oversold and overbought levels plus a dotted midline at 50. Background shading highlights when RSI is above th

Indicator v6 Oscillators & momentum
Updated 3 months ago · None stated GitHub repository of RSI Basic Template

AAPP with Alerts

by capissimo
114 stars

This indicator calculates an adaptive moving average filter and relative strength divergence to identify directional shifts directly on the price chart. It signals long entries when the moving average slope turns upward and short entries when it turns downward

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of AAPP with Alerts

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