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

Daily Trend Filter

by agutinbaigo28
147 stars

Calculates market regime conditions by combining RSI, MACD, and ADX/DMI indicators. It evaluates whether the market is in a strong bullish, strong bearish, neutral, or non-trending regime. The script plots a colored line overlaying the close price to reflect t

Indicator v5 TrendOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of Daily Trend Filter

Fractal Model

by fxraptor-alpha
137 stars

Fractal Model is a price-chart indicator that tracks multi-timeframe liquidity sweeps, reversal confirmation, and forward projections. It draws higher-timeframe candles beside price, marks high and low sweeps, and tracks CISD plus later IC-CISD levels after a

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 weeks ago · Custom licence GitHub repository of Fractal Model

Consolidation Filter

by capissimo
114 stars

Consolidation Filter identifies market indecision and sideways ranges characterized by low volatility. It computes a forecast oscillator variant comparing price against an exponential moving average or a McGinley dynamic across three selectable methods. When t

Indicator v5 Volatility & bandsMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Consolidation Filter

200DMA last DOM - ajh

by hasnocool
106 stars

This strategy executes a long-only trend-following system based on a simple moving average, designed primarily for daily charts. It plots the moving average directly on the price chart and evaluates trading signals strictly on a user-defined day of the month,

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 200DMA last DOM - ajh
104 stars

This strategy combines Bollinger Bands with a short RSI to fade moves that leave the bands and then return. A long requires the prior bar below the lower band and oversold, then a close back inside the band while RSI is between 30 and 50. Shorts mirror that at

Strategy v5 Oscillators & momentumVolatility & bands
Updated 3 years ago · MIT GitHub repository of Bollinger Bands and RSI Strategy
99 stars

The Absolute Price Oscillator (APO) script calculates the difference between a fast exponential moving average (EMA) and a slow EMA for a specified source series. It uses explicit EMA calculations featuring warmup compensation to handle early bar initializatio

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Absolute Price Oscillator (APO)
92 stars

This overlay indicator draws horizontal lines at ten hardcoded ETH long-liquidation prices and ten short-liquidation prices from a Hyperliquid snapshot. Longs use red and amber and shorts use green and cyan, with the three nearest levels on each side drawn thi

Indicator v6 Support & resistance
Updated 2 months ago · Custom licence GitHub repository of Moon Dev Liq Lines — ETH

KernelFunctions

by artificial-intelligence-edge
75 stars

KernelFunctions is a Pine Script v5 library that exports kernel weight functions for Nadaraya-Watson style estimation. It calculates a Rational Quadratic kernel, a Gaussian kernel based on a radial basis function, and a periodic kernel that models repeating be

Library v5
Updated 3 days ago · MIT GitHub repository of KernelFunctions

Hull Keltner Channel

by cryptorife
75 stars

Hull Keltner Channel calculates and plots a customized Keltner Channel overlaid directly on the price chart. It replaces the traditional moving average baseline with a Hull Moving Average variation, offering standard HMA, exponential EHMA, and triple THMA opti

Indicator v4 Moving averagesVolatility & bands
Updated 3 years ago · GPL-3.0 GitHub repository of Hull Keltner Channel
65 stars

This indicator calculates the RSI with a 20-period length and plots it on the chart. It marks upward crossovers above 50 with green arrows and downward crossovers below 50 with red arrows. A horizontal line appears at the 50 level. The script sends alerts when

Indicator v5 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of alertcondition() on single condition

Get 20 SMA of Apple

by PythonForForex
64 stars

This indicator requests Apple's daily closing price and calculates a 20-period simple moving average of that series. It plots the moving average on the price chart as an overlay. There are no user inputs, so the symbol, daily timeframe, and length stay fixed i

Indicator v5 Moving averages
Updated 4 years ago · None stated GitHub repository of Get 20 SMA of Apple

Type Declaration Coverage

by frizLabz-FFriZz
59 stars

This script demonstrates type declarations supported in Pine Script v6. It defines imaginary library exports including user-defined types with fields of int float string bool color array matrix and map types as well as enums. The script also shows primitive va

Indicator v6 Repaints
Updated 1 year ago · MIT GitHub repository of Type Declaration Coverage

Momentum Rider DAILY FINAL

by greenpeas007
58 stars

This strategy combines exponential moving averages (EMA 9, 21, 50), RSI, MACD, and Supertrend indicators to enter long positions. It triggers trades using six dynamic setups based on momentum breakouts, EMA crossovers, and pullbacks. Position sizing is compute

Strategy v6 TrendOscillators & momentum Repaints
Updated 4 months ago · Custom licence GitHub repository of Momentum Rider DAILY FINAL

BTC Futures MACD

by iamrichardD
57 stars

This strategy plots a MACD in a separate pane and enters on zero-line or signal-line crosses, with an optional early momentum trigger. Volume and a trend moving average can filter signals, and shorts can be disabled so only long trades are taken. It sizes posi

Strategy v6 Oscillators & momentumScalping Repaints
Updated 1 year ago · Apache-2.0 GitHub repository of BTC Futures MACD
56 stars

This overlay indicator highlights candles with a body smaller than 50% of their total range by coloring them white on the price chart. Simultaneously, it calculates and plots horizontal lines for open prices across multiple higher timeframes, such as daily, we

Indicator v6 Support & resistanceCandlestick patterns Repaints
Updated 2 months ago · None stated GitHub repository of Daily Weekly Monthly Yearly Opens
55 stars

This indicator automatically identifies structural pivot highs and pivot lows using a fixed 15-bar left and right evaluation window. It stores recent pivot values and timestamps in dynamic arrays and, on the current bar, plots extended trendlines connecting th

Indicator v6 TrendSupport & resistance
Updated 6 months ago · Apache-2.0 GitHub repository of Auto Trendlines using line.*
53 stars

This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of BTCUSD 5M Optimized Strategy

Delta Histogram

by milocaetano
48 stars

Delta Histogram is a separate-pane indicator that plots per-bar volume delta as a histogram alongside a 20-period simple moving average. It visualizes net buying and selling pressure for each bar, helping traders track changes in order flow aggression relative

Indicator v5 VolumeOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Delta Histogram

This indicator calculates the acceleration of price action by computing the slope of the linear regression slope over a rolling window. It utilizes two sequential rolling linear regression stages implemented with circular buffers to ensure deterministic comput

Indicator v6 Oscillators & momentumTrend
Updated 8 months ago · MIT GitHub repository of Acceleration (Slope of Slope) (ACCEL)

Hash Ribbons

by oguzhandilber
47 stars

This indicator plots the Hash Ribbon metric by calculating 30-day and 60-day simple moving averages of Bitcoin network hash rate data. Designed for long-term market cycle analysis, it draws in a separate pane and displays hash ribbons alongside optional buy si

Indicator v4 Moving averagesTrend Repaints
Updated 5 years ago · None stated GitHub repository of Hash Ribbons

AM TBR — NQ Stats

by TamaraKGreen
46 stars

The AM TBR indicator calculates statistical levels for NQ futures using standard deviation. It plots a sigma ladder showing touch levels at 0.5 to 2.0 standard deviations, marks touch points, displays Mean Absolute Error (MAE) zones after touches, and shows Me

Indicator v6 Volatility & bandsSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of AM TBR — NQ Stats

Trap Shorts - Hamza Naveed

by ProfHamzaNaveed
43 stars

This indicator tracks and visualizes cryptocurrency net positioning across multiple derivative exchanges, including Binance, BitMEX, and Kraken. It calculates aggregated net longs, net shorts, net delta, and ratio metrics, or an optional Position RSI, renderin

Indicator v5 VolumeOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Trap Shorts - Hamza Naveed
43 stars

This overlay indicator monitors moving-average relationships for up to ten symbols. For each market it requests the close and three exponential moving averages from a user-chosen timeframe, defaulting to twelve hours, and builds a status for the faster-versus-

Indicator v6 Moving averagesScreeners & dashboards
Updated 1 year ago · None stated GitHub repository of Multi-Market MA Cross Monitor

RSTRsi

by readysetcryptocodes
43 stars

This indicator calculates and plots two Relative Strength Index (RSI) lines in an oscillator pane alongside standard reference bands at 30, 50, and 70. By default, it plots a short-period RSI and a secondary RSI. On the 3-minute and 15-minute chart intervals,

Indicator v4 Oscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of RSTRsi

This strategy executes trades based on pivot levels, an exponential moving average, and a multi-stage smoothing trend line. It identifies support and resistance points from pivot highs and lows, combining them with price relationship rules against a custom smo

Strategy v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Binancash - Candle Strategy Futures on Binance

Gann Square of Nine: Planetary Degrees

by blueprintresearch-dev
42 stars

This indicator maps planetary positions onto W.D. Gann's Square of Nine grid using astronomical ephemeris algorithms. It tracks pivot highs and lows with corresponding planetary longitude degrees, projects future target degrees ahead on the chart, and supports

Indicator v6 Support & resistanceScreeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of Gann Square of Nine: Planetary Degrees

FVG RSI Strategy (Optimized)

by skywalker0803r
42 stars

This strategy plots on the price chart and trades fair value gaps filtered by RSI and two EMAs. It opens a long when a bullish gap, a rising candle, RSI below the oversold level, and price under both EMAs align, and a short on the opposite conditions. Each tra

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 2 months ago · None stated GitHub repository of FVG RSI Strategy (Optimized)

Candle Stage Analysis

by ChartsLector
41 stars

This indicator classifies market trends into structured stages based on moving average alignments, compression, and ATR distance from the 50-period SMA. It tracks multiple exponential moving averages against the 50 SMA to detect basing phases, breakouts, trend

Indicator v6 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of Candle Stage Analysis

Macro Alert System

by Thanhtran-165
38 stars

The Macro Alert System is a quantitative macroeconomic monitoring indicator designed to evaluate risk regimes, interest rates, spreads, and multi-horizon market stability. It computes composite macro risk scores using empirical percentile distributions, Welch-

Indicator v6 Screeners & dashboards
Updated 5 weeks ago · None stated GitHub repository of Macro Alert System

Abandoned Baby - Bearish

by TWODS-CAPITAL
37 stars

This indicator detects a bearish Abandoned Baby candlestick pattern on the price chart. It looks for an uptrend, a white candle, a doji that gaps away from that candle, and a following black candle that gaps below the doji. The trend filter can use a 50-period

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Abandoned Baby - Bearish

ADX_40

by Li-Hongmin
36 stars

This indicator plots the Average Directional Index (ADX) alongside a static threshold line in a separate pane. It calculates directional movement using the true range and directional indicators smoothed with running moving averages. Users can adjust the smooth

Indicator v4 Trend
Updated 1 year ago · None stated GitHub repository of ADX_40

CombinedBinHAndClucV8

by viktors1982
36 stars

This strategy trades on the price chart using multiple indicators. It enters long positions when price dips meet conditions on Bollinger Bands 40 and 20, RSI, MFI, volume and other thresholds. It exits at custom ROI profit levels based on RSI or after timeout

Strategy v4 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of CombinedBinHAndClucV8

Pine Script v6 Test Features

by tradesdontlie
33 stars

This indicator demonstrates several Pine Script v6 language features on the price chart. It requests the daily close for a fixed list of stock symbols and writes those prices to the log. On the last bar it draws labels using exact point sizes and bold or itali

Indicator v6
Updated 8 days ago · MIT GitHub repository of Pine Script v6 Test Features

Bitcoin Energy Value Oscillator

by thanhnguyennguyen
33 stars

This indicator estimates Bitcoin energy value from joules of mining energy input, supply growth, and a fiat factor, then plots that value as an oscillator in a separate pane. A simple moving average of the energy value is drawn using a user-set length in days.

Indicator v4 Oscillators & momentumMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Bitcoin Energy Value Oscillator

Study

by sibvic
33 stars

This overlay indicator is an unfinished alert template. Placeholder buy and sell conditions track an open long or short state and can fire entry alerts immediately or only after a bar closes. It calculates optional stop-loss and take-profit prices from a fixed

Indicator v4
Updated 4 years ago · MIT GitHub repository of Study

This indicator calculates fast and slow moving averages based on predefined Fibonacci ratio pairs, such as 89/144 or 21/34, along with a combined Golden Ratio moving average. Users can choose from multiple weighting types, including Simple, Exponential, Runnin

Indicator v4 TrendMoving averages
Updated 5 years ago · Unlicense GitHub repository of [Pirate] Deconstructed FMAs + Crosses

BBfib

by modster
32 stars

This indicator plots Bollinger Bands on the price chart using a 15-bar simple moving average of ohlc4 as the basis line. It calculates upper and lower bands at one standard deviation multiplied by 1.12, plus additional outer levels at 1.5, 1.75, and 0.5 deviat

Indicator v4 Moving averagesVolatility & bands
Updated 3 years ago · None stated GitHub repository of BBfib
30 stars

This indicator simulates a crypto hedge-scalping grid in a separate pane and tracks cumulative profit after commission. It builds a short EMA and places four long grid levels plus one deeper short hedge level as percentages below that EMA. Equity shares of a U

Indicator v5 ScalpingMoving averages
Updated 2 years ago · Custom licence GitHub repository of Hedge Scalp - Cumulative Profit

Zen ABR Ladder

by Zen-Tim
29 stars

Zen ABR Ladder plots multiple Average Bar Range (ABR) lookbacks (2, 4, 8, 16, 32) alongside an Average Daily Range (ADR) scalp threshold in a separate pane. It measures bar ranges in price points and displays layered translucent shading between the scalp line

Indicator v6 Volatility & bandsScalping
Updated 2 weeks ago · MIT GitHub repository of Zen ABR Ladder

The indicator calculates a triple-smoothed moving average and a corresponding signal line to identify trend direction and potential reversal points directly on the price chart. Users can select from EMA, SMA, RMA, or WMA for both the main triple smoothing and

Indicator v6 Moving averagesTrend
Updated 11 months ago · Custom licence GitHub repository of Triple Smoothed Signals [AlgoAlpha]
27 stars

This indicator calculates an approximate volume profile directly on the price chart for a specified block of historical bars. It divides the high-low price range of the block into discrete rows, distributes bar volume across overlapping rows, and visually plot

Indicator v4 VolumeSupport & resistance Repaints Archived
Updated 2 years ago · MPL-2.0 GitHub repository of Poor Man's Volume Profile

Bands

by heyphat
26 stars

This library exports a Band type and functions that build a simple-moving-average basis with upper and lower envelopes from standard deviation. It classifies a source as above, below, or inside those envelopes, measures band width, and scales an imported z-sco

Library v6 Volatility & bandsMoving averages
Updated 2 months ago · AGPL-3.0 GitHub repository of Bands

The Relative Volume Strength Index (MZ RVSI) is a separate-pane oscillator designed to measure volume momentum and trend strength. It allows users to choose between various volume oscillator types, including On Balance Volume, Klinger Volume Oscillator, and Vo

Indicator v4 VolumeOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Relative Volume Strength Index (MZ RVSI)

Bayesian BBSMA Oscillator

by tistaharahap
25 stars

This indicator calculates directional probabilities based on price position relative to Bollinger Bands and a simple moving average over a rolling lookback window. It computes breakup, breakdown, and combined prime probability percentages, plotting up to three

Indicator v4 Oscillators & momentumMoving averages
Updated 6 years ago · None stated GitHub repository of Bayesian BBSMA Oscillator

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