Synced with GitHub · updated today

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
1 stars

TN Sentiment Macro Sovereign is a trend-following strategy that combines technical moving average crossovers with external macro sentiment data. It calculates 12-period and 26-period Exponential Moving Averages alongside a smoothed sentiment metric fetched via

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sentiment Macro Sovereign

A Pine Script v5 indicator that approximates a Tom DeMark style count on the price chart. It compares each bar with the one four bars earlier, keeps a running count over a lookback window, and plots a green up triangle at nine and a red down triangle at thirte

Indicator v5 Oscillators & momentum
Updated 6 months ago · None stated GitHub repository of Tom DeMark 9 and 13 Buy/Sell Signals

Day High Low Test

by ivansoft
1 stars

Experimental overlay that marks the day's high and low and the session open on the price chart, with lines, labels and background shading. It includes special handling for Moscow Exchange futures sessions (main and evening) and uses lower-timeframe requests to

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of Day High Low Test
1 stars

A Pine v4 strategy that plots a 41-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of XLMBTC EMA Cross Strategy
947 stars

Moving Average Channel plots separate simple moving averages for upper and lower bands on the price chart. It fills the space between bands with semi-transparent color and colors bars green above the upper band, red below the lower band, or gray in between. Us

Indicator v4 Moving averagesSupport & resistance
Updated 11 days ago · GPL-3.0 GitHub repository of Moving Average Channel
330 stars

This strategy implements a trend-following execution model based on the classic Supertrend indicator. When the ATR-derived Supertrend flips to a bullish state, the strategy opens a long position. The initial stop loss is determined by the lowest price over a u

Strategy v4 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Supertrend [Alorse]

CLDR-tracker

by Allen1212
303 stars

This indicator plots historical buy and sell transactions executed by ARK Invest for Cloudera directly on the price chart. It renders visual labels at specific bar timestamps to show transaction dates and trade counts across tracked funds. The primary setting

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

[RS]Function - Days in a Month

by ricardosantos79
261 stars

This utility indicator calculates and plots the total number of days in a specified calendar month and year. It plots a constant numeric value in a separate pane based on user-defined inputs for the year and month. The underlying function bounds the month inpu

Indicator v5
Updated 4 years ago · None stated GitHub repository of [RS]Function - Days in a Month
106 stars

This overlay strategy plots a short Bollinger Band and enters long when the close crosses above the lower band while a 14-period SMA is above a 42-period SMA. It enters short when the close crosses below that lower band while the faster SMA is below the slower

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Best TradingView Strategy
99 stars

This indicator plots John Ehlers' Cyber Cycle in a separate pane. It smooths the chosen source with a four-bar FIR filter, then applies a two-pole high-pass IIR filter to isolate the dominant cycle. A one-bar delayed trigger line supports crossover reading aga

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Cyber Cycle (CCYC)
65 stars

This overlay indicator shows how a value computed inside a function can be read outside it. A one-element float array stores the current average of high, low, close, and the previous average, falling back to close when that average is missing. The function the

Indicator v4 Moving averages
Updated 5 days ago · GPL-3.0 GitHub repository of Debugging from inside functions
47 stars

This indicator calculates the arithmetic average of the open, high, and low prices for every bar and plots the resulting series directly on the main price chart. The calculation uses constant multiplication rather than division to optimize execution speed. It

Indicator v6
Updated 8 months ago · MIT GitHub repository of Open-High-Low Average (OHL3)

MTF Swing Highs and Lows

by TamaraKGreen
46 stars

This indicator plots multi-timeframe swing highs and lows on the price chart. It finds pivots with Bill Williams fractals or, when the filter is on, a stricter regular fractal, then stores the latest high and low. Users can show daily, four-hour, one-hour, 30-

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of MTF Swing Highs and Lows

Kicking - Bullish

by TWODS-CAPITAL
37 stars

This indicator detects a bullish kicking candlestick pattern on the price chart. It marks a two-candle sequence in which the prior candle is a black marubozu and the current candle is a white marubozu that gaps above the prior high. A K label is drawn below th

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Kicking - Bullish
13 stars

This strategy plots a trend ribbon and colored background on the price chart using moving averages calculated across price highs and lows. It generates trade signals to automate orders through Zignaly webhooks or email alerts. Users can configure the moving av

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon

This indicator measures the relative strength of a chart symbol compared to a benchmark symbol, such as SPY or QQQ. It plots either a raw relative strength ratio or a Mansfield RS oscillator in a separate pane. Confluence signals trigger when relative strength

Indicator v6 TrendOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Relative Strength Line [WavesUnchained]

Predictive Moving Average Convergence Divergence - Ryder calculates a classic MACD oscillator with customizable fast, slow, and signal lengths. In addition to plotting the standard MACD line, signal line, and histogram in a separate pane, it calculates forward

Indicator v6 Oscillators & momentumMoving averages

Heikin Ashi

by g-moe
3 stars

This indicator combines a standard relative strength index (RSI) with a Heikin Ashi moving average trend visualization in a separate pane. It calculates the RSI along with a customizable moving average overlay supporting SMA, EMA, SMMA, WMA, and VWMA types. Ad

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of Heikin Ashi

NIG Probability Table

by regalouisei
2 stars

This indicator estimates a normal-inverse Gaussian distribution from recent log returns and approximates the probability of price falling in each return bin. It measures mean, standard deviation, skewness, and kurtosis over a rolling window, then sets the bin

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of NIG Probability Table

Simple Moving Average (SMA)

by mushroom-men-Trading
2 stars

This script calculates and plots a Simple Moving Average on the price chart. It uses a custom function with circular buffer and running sum for efficient computation of the SMA value from the chosen source, defaulting to close prices. The primary setting allow

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Simple Moving Average (SMA)

PSMC - Splitting Alerts

by Web3Degenerate
2 stars

This indicator demonstrates how to configure and separate multiple alert triggers using input toggles. It calculates a 7-period RSI to identify overbought and oversold conditions, alongside candlestick confirmations when price closes against the extreme. Signa

Indicator v4 Oscillators & momentumCandlestick patterns
Updated 2 years ago · None stated GitHub repository of PSMC - Splitting Alerts
1 stars

This strategy uses lower-timeframe data to probe numeric array reductions in Pine Script. On a 15-minute chart it fetches 15 one-minute closes using request.security_lower_tf and sums them to create a synthetic intra-bar momentum. It plots EMAs on the price ch

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF lower-tf probe 01 - float ratio15

P_ver_ema_series_length

by GammaExpansion
1 stars

This indicator plots an exponential moving average of the close price in a separate pane. The average length is not a user setting. On each bar it equals the bar index modulo ten, plus one, so the length cycles through the integers from one to ten. Because the

Indicator v6 Moving averages
Updated 6 days ago · MIT GitHub repository of P_ver_ema_series_length

DEPV2 Günlük Veri 1

by YuceSezar89
1 stars

This indicator plots open, high, low, and close for eleven user-selected symbols in a separate pane, using the chart timeframe. The chart symbol supplies the first series, while the others are requested from Binance USDT perpetual pairs by default. Symbol inpu

Indicator v6 Screeners & dashboards
Updated 12 days ago · None stated GitHub repository of DEPV2 Günlük Veri 1
1 stars

A trend indicator drawn on the price chart that plots EMA 9, 21, 50 and SMA 200 with shaded clouds between them. Buy and sell conditions are filtered by RSI thresholds, a minimum and rising ADX, relative volume, and a smart range filter that skips small or cho

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of JL2 EMA RSI ADX Volume Smart Range

A Pine Script v5 indicator that draws bullish and bearish order block zones on the price chart, with volume information shown inside each zone. Swing length sets how pivots are found, zones can be combined, sized with a maximum ATR multiplier and limited to a

Indicator v5 SMC / ICT / price actionVolume
Updated 6 months ago · None stated GitHub repository of Volumized Order Blocks 2026 (Resized)

getSeries

by ivansoft
1 stars

A Pine Script v5 library whose functions build arrays of values that meet a condition. One function collects the latest values where a condition is true since a reset condition, optionally keeping only a set number of values, and another keeps values within a

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

A Pine v4 strategy that plots a 36-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of XMRBTC EMA Cross Strategy

CLLS-tracker

by Allen1212
303 stars

This indicator plots historical buy and sell transactions executed by ARK Invest for Cellectis S.A. (CLLS) directly on the price chart. It renders green upward labels below price bars for purchase dates and red downward labels above price bars for sales dates,

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

[RS]Signal to Noise Bands

by ricardosantos79
261 stars

This overlay indicator plots a simple moving average of close as a center line and two pairs of bands around it. Width equals the standard deviation of close times the base-ten log of the ratio of the powered signal to the powered deviation. A second pair keep

Indicator v5 Volatility & bandsMoving averages
Updated 4 years ago · None stated GitHub repository of [RS]Signal to Noise Bands
114 stars

This indicator overlays two Hull Moving Average variations smoothed with an optional Kalman filter directly on the price chart. It fills the space between the two curves with dynamic trend colors and generates buy and sell signal labels when the curves cross.

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

This strategy builds upon the Big Snapper system by combining trend-following moving averages, Chaikin Volatility, and volume filtering to generate trade signals directly on the main chart. Long and short entries trigger when Snapper signals align with medium

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Big Snapper Chaiking Volatility + TP RSI
99 stars

This indicator calculates the Ehlers Decycler Oscillator as the difference between two 2-pole Butterworth high-pass filters applied to a chosen price source. The long-period filter result is subtracted from the short-period filter result, and the oscillator is

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Decycler Oscillator (DECO)
65 stars

This educational example script demonstrates how to debug custom Pine Script functions by returning intermediate internal variables alongside main outputs using tuple destructuring. It defines a custom function that calculates an instant average price from the

Indicator v4 Moving averages
Updated 5 days ago · GPL-3.0 GitHub repository of Debugging from inside functions

Parabolic SAR

by mihakralj
47 stars

This indicator calculates J. Welles Wilder's classic Parabolic Stop and Reverse (PSAR) trailing stop levels to highlight trend direction and potential market reversals. It updates an acceleration factor whenever price makes new extreme highs or lows, bound by

Indicator v6 TrendSupport & resistance
Updated 8 months ago · MIT GitHub repository of Parabolic SAR

Session highs, lows & opens

by TamaraKGreen
46 stars

This indicator tracks and plots high, low, and opening levels for major trading sessions directly on the price chart. It calculates price boundaries across defined periods including London, New York, Asia, and New York afternoon sessions. The tool does not gen

Indicator v5 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Session highs, lows & opens

Klinger Oscillator

by TWODS-CAPITAL
37 stars

The Klinger Oscillator evaluates long-term volume flow trends while staying responsive to short-term price movements. It calculates signed volume by determining whether the typical price (HLC3) increased or decreased relative to the previous bar. The main osci

Indicator v5 VolumeOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Klinger Oscillator
13 stars

This strategy uses Noro TrendRibbon direction changes to decide long or short bias. It builds a corridor from recent high and low prices, opening a long below that corridor while longing and a short above it while shorting, with the entry tied to a percentage

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon

This strategy identifies reversal opportunities based on liquidity sweeps and multi-gate confluence scoring. It evaluates setups using mandatory conditions such as swing sweeps, body and ATR filters, and dual EMA higher-timeframe trend alignment, alongside opt

Strategy v6 SMC / ICT / price actionTrend
Updated 2 days ago · MIT GitHub repository of Reversal Engine Score [WavesUnchained] Strategy
7 stars

Range Oscillator (Zeiierman) plots a range-based oscillator in a separate pane. It qualifies a range box from a minimum number of bars and sizes that box vertically with an ATR width multiplier. A heatmap splits the recent high-low span into horizontal levels

Indicator v6 Oscillators & momentumVolatility & bands
Updated 3 months ago · None stated GitHub repository of Range Oscillator (Zeiierman)

CRT State Engine Complete

by alboogycOdR
6 stars

This indicator overlays an institutional Candle Range Theory (CRT) framework directly on the price chart. It analyzes session states across New York time models (1 AM, 5 AM, and 9 AM), detects market structure breaks, identifies order blocks, and tracks liquid

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine Complete
3 stars

The Heikin Ashi Buy Sell Arrows indicator calculates custom Heikin-Ashi values on the current chart to identify potential trend reversals. A buy signal is generated when a Heikin-Ashi candle forms with no lower wick following a sell sequence, while a sell sign

Indicator v5 Candlestick patternsTrend
Updated 5 months ago · None stated GitHub repository of Heikin Ashi Buy Sell Arrows

Browse by Category

Learn to Use Pine Scripts

Free, plain-English guides: add a script to TradingView, read what it does, test it and avoid the common traps.

  1. 1Using this librarySearch, filters, licences and what the badges mean.
  2. 2Add a script to TradingViewCopy, paste into the Pine Editor, save and add to chart.
  3. 3Indicators, strategies and librariesWhat each type does and how to tell them apart.
  4. 4Spot a script that repaintsWhy some signals change after the bar closes.
  5. 5Backtest a strategyStrategy Tester settings that keep results honest.
  6. 6Send alerts to MT4 or MT5From a TradingView alert to an order in MetaTrader.
  7. 7What Pine Script isThe language, what it can and cannot do, and where to start.
  8. 8Write your first indicatorA complete script, line by line, in the Pine Editor.
  9. 9Read a script before you trust itA routine for checking inputs, logic and red flags.
  10. 10Edit a script safelyChange colours and lengths, add a filter or an alert.
  11. 11Pine Script alertsalertcondition(), alert(), placeholders and webhooks.
  12. 12Build a crossover strategyAn EMA cross strategy with an ATR stop, ready to test.

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