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

The Vortex Trend Tracker calculates positive and negative Vortex Indicator values smoothed with exponential moving averages. It plots a histogram representing the absolute difference between the smoothed positive and negative lines in a separate pane, alongsid

Indicator v4 TrendOscillators & momentum
Updated 5 years ago · None stated GitHub repository of Vortex Trend Tracker 2.0 + RSI
46 stars

This overlay indicator draws a set of higher-timeframe candles on the price chart. The user sets the timeframe or lets it select automatically, plus candle count, size, offset, margin, and whether the candles are standard or Heikin Ashi. A table can show the a

Indicator v6 Support & resistanceCandlestick patterns Repaints
Updated 7 weeks ago · None stated GitHub repository of HTF Sweep Model with CISD Table
43 stars

This indicator plots the percentile rank of a short ATR divided by a longer ATR in a separate pane. It calculates two average true ranges, forms their ratio, ranks that ratio over a lookback window, and smooths the rank with an exponential moving average. User

Indicator v5 Volatility & bands
Updated 1 year ago · None stated GitHub repository of ATR Ratio Percentile Rank

BTC Onchain Indicator

by readysetcryptocodes
43 stars

The indicator overlays Bitcoin pricing models built from daily on-chain series, including difficulty, supply, and market capitalization. It plots a difficulty ribbon from a power-law regression and several moving averages, a stock-to-flow price, a cumulative a

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of BTC Onchain Indicator

Binance USDT 2H

by dearvn
43 stars

Binance USDT 2H is a trading strategy designed for Binance futures contracts. It calculates custom smoothed price averages and evaluates Stochastic oscillator lines fetched across multiple timeframes using security requests. Signals generate long and short ent

Strategy v5 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Binance USDT 2H

Price and Longitude Angles

by blueprintresearch-dev
42 stars

Price and Longitude Angles maps planetary longitude to price and plots Gann fan lines from a selected high or low pivot on the price chart. It supports one or two planets, geocentric or heliocentric positions, and single, average, or synodic calculation modes.

Indicator v6 Support & resistanceScreeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of Price and Longitude Angles

MACD NN Weighted Strategy

by skywalker0803r
42 stars

Calculates MACD line and signal line differences, passing current and previous deltas through a two-layer neural network model with ReLU activation functions. User-configurable weights, biases, and threshold values determine output classification signals. The

Strategy v5 AI / machine learningOscillators & momentum
Updated 2 months ago · None stated GitHub repository of MACD NN Weighted Strategy
38 stars

Synthesizes macroeconomic indicators for the Vietnamese economy into a multi-pillar monitoring engine and composite risk score. It tracks inflation, policy rates, interbank interest rates, GDP growth, exchange rates, and sovereign bond yields using Taylor-rule

Indicator v6 Screeners & dashboards
Updated 5 weeks ago · None stated GitHub repository of MacroAcademic - VN Economy Engine

Accumulation/Distribution

by TWODS-CAPITAL
37 stars

This indicator calculates the classic Accumulation/Distribution line and plots it in a separate pane. On each bar it multiplies volume by the close location inside the high-low range, then adds that value to a running total. Bars where the high equals the low,

Indicator v5 Volume
Updated 3 years ago · MIT GitHub repository of Accumulation/Distribution

SMAOffsetProtectOptV0

by viktors1982
36 stars

This strategy generates buy and sell signals based on moving averages with price percentage offsets, combined with an Elliott Wave Oscillator (EWO) and RSI filter. Long entries occur when price falls below the offset moving average under specific EWO and RSI c

Strategy v4 Moving averagesOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of SMAOffsetProtectOptV0

CCI Categy

by thanhnguyennguyen
33 stars

CCI Categy calculates and plots the Commodity Channel Index (CCI) oscillator in a separate chart pane. It computes a Simple Moving Average and mean deviation over a customizable length and price source. The script plots the primary CCI curve alongside referenc

Strategy v4 Oscillators & momentum
Updated 1 year ago · None stated GitHub repository of CCI Categy
33 stars

This indicator plots a T3 moving average on the price chart. It builds the line by applying a generalized double-exponential smoother three times to the chosen source, so the result is a weighted blend of nested exponential moving averages. Length sets the EMA

Indicator v4 Moving averagesTrend
Updated 5 years ago · Unlicense GitHub repository of [Pirate] T3 Moving Average

Bollinger Bands

by modster
32 stars

This indicator plots a Bollinger-style envelope on the price chart. It calculates a simple moving average of the chosen source and multiplies the standard deviation by the multiplier to set the deviation. It draws the basis plus two pairs of offset lines at 0.

Indicator v4 Volatility & bands
Updated 3 years ago · None stated GitHub repository of Bollinger Bands

Zen ABR Range Bands

by Zen-Tim
29 stars

Calculates an Exponential Moving Average baseline surrounded by Average Bar Range bands based on an 8-period bar range calculation. Plots upper and lower channels at 1x, 2x, 3x, and 4x ABR multiples directly on the main price chart. Includes configurable bar h

Indicator v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen ABR Range Bands

This overlay indicator estimates price with a Nadaraya-Watson rational quadratic kernel and draws an envelope around that estimate. It regresses close, high, and low, then builds a kernel ATR from those estimates. Near and far upper and lower bounds, plus thei

Indicator v5 Volatility & bands
Updated 11 months ago · Custom licence GitHub repository of Nadaraya-Watson: Envelope (Non-Repainting)
26 stars

This Pine Script v6 indicator serves as a test script for map and matrix data structures. It initializes a string-to-float map to store the current closing price and constructs a two-by-two floating-point matrix filled with the close, then assigns the current

Indicator v6
Updated 2 months ago · AGPL-3.0 GitHub repository of Feature Matrix - Map + Matrix

CCI Divergences

by tistaharahap
25 stars

This indicator plots the Commodity Channel Index in a separate pane and marks regular and hidden divergences between CCI pivots and price. It compares oscillator highs and lows with price highs and lows inside a configurable lookback range. Regular bullish and

Indicator v4 Oscillators & momentumDivergence
Updated 6 years ago · None stated GitHub repository of CCI Divergences
24 stars

This overlay indicator maps smart money structure on the price chart. It marks internal and swing break of structure and change of character, bullish and bearish order blocks, equal highs and lows, fair value gaps, premium and discount zones, and strong or wea

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 11 days ago · Custom licence GitHub repository of Smart Money Concepts [LuxAlgo] test A

BB Swing

by benso87
24 stars

This strategy calculates Bollinger Bands, a configurable moving average slope, Stochastic RSI, ATR, and ADX directly on the price chart. It evaluates trend bias and momentum conditions to generate long and short swing entries using percent-of-equity sizing. Th

Strategy v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of BB Swing
23 stars

This indicator detects fair value gap patterns and candle breaks across multiple user-defined timeframes using historical security data requests. It monitors price interaction with specific candle levels and triggers alerts when a break occurs. The main inputs

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 weeks ago · Custom licence GitHub repository of Multi-TF FVG Kerze Break Alert
23 stars

The Connors Relative Strength Index (CRSI) measures short-term momentum by averaging three components: a standard Relative Strength Index (RSI), an Up/Down streak RSI, and the Percent Rank of a 1-period Rate of Change (ROC). It plots as a single line in a sepa

Indicator v5 Oscillators & momentum
Updated 3 months ago · Custom licence GitHub repository of Connors Relative Strength Index

Mylib

by ferranbt
21 stars

This script serves as a minimal utility library written in Pine Script v6. It provides an exported helper function that calculates the sum of two numeric arguments. As a reusable code library, it produces no visual plots, charts, or trading signals, and it con

Library v6
Updated 7 weeks ago · MPL-2.0 GitHub repository of Mylib

This indicator estimates an adaptive stochastic in the style of John Ehlers and is titled as an inverse Fisher transform. It high-pass filters the selected source, smooths the result, measures Pearson correlation across lags, and derives a dominant cycle from

Indicator v5 Oscillators & momentum
Updated 1 year ago · None stated GitHub repository of Inverse Fisher Transform of Adaptive Stochastic

Bandz Po3 Profiler

by samuelharting
18 stars

Bandz Po3 Profiler draws an ICT-style power-of-three profile on the price chart. It plots higher-timeframe candles, C1 through C4 sequence boxes, T-Spot zones, CISD marks, fair value gaps, STDV projections, sweeps, midpoints, opens, and liquidity. It also mark

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz Po3 Profiler

Marubozu finder

by shibisuriya
18 stars

This indicator identifies Marubozu candlestick patterns directly on TradingView price charts. It plots green triangles for bullish Marubozu below bars and red triangles for bearish Marubozu above bars. The pattern requires upper and lower wicks to stay within

Indicator v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Marubozu finder

Greeffer BB Strategy

by SammyEnigma
18 stars

This strategy fades Bollinger Band extremes on the close. It opens a short when price crosses above the upper band and the 14-period RSI is above 75, and a long when price crosses below the lower band and RSI is above 25. Shorts close when RSI falls below 30 a

Strategy v4 Volatility & bandsOscillators & momentum
Updated 6 years ago · None stated GitHub repository of Greeffer BB Strategy
16 stars

This strategy trades Donchian breakouts on the price chart. It enters long or short on a longer channel break and can add further units as price advances by a fraction of ATR, up to a set maximum. Later units risk a smaller share of equity than the first. It e

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 11: Tapered Pyramid
16 stars

2XTMA Centered Bands Indicator plots two centered triangular moving averages with ATR-scaled upper and lower bands on the price chart. It colors each average bull or bear and can show an angle caution label. Optional alerts fire on band crosses, a return towar

Indicator v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of 2XTMA Centered Bands Indicator

Alighten Pattern B

by alighten-dev
14 stars

Alighten Pattern B is a price-chart indicator that scans stored ZigZag pivots for Pattern B triples and marks long and short signals. It can draw dashed Pattern B levels and an optional ZigZag that traces the structure those signals use. Users can enable or hi

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 weeks ago · None stated GitHub repository of Alighten Pattern B

Market Monitor - 15m

by chris-c-thomas
14 stars

Market Monitor - 15m is a directional bias chart overlay designed for 15-minute intraday chart analysis. It calculates a triple exponential moving average ribbon with EMA cloud shading, session VWAP with multiplier bands, prior day levels, a 30-minute opening

Indicator v6 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of Market Monitor - 15m
14 stars

This overlay indicator builds a money-management table on the price chart. It takes a deposit, a maximum risk percentage per trade, and a commission percentage, then sizes risk against up to ten user-defined stop-loss percentages and an optional ATR stop. The

Indicator v5 ScalpingVolatility & bands
Updated 3 years ago · None stated GitHub repository of Scalping money management

Relative Strength Index

by deepentropy
13 stars

The Relative Strength Index indicator calculates momentum based on price changes over a specified length and plots the curve in a separate pane. It includes adjustable upper and lower bands, background color fills, and an optional smoothing moving average or B

Indicator v6 Oscillators & momentumMoving averages
Updated 6 months ago · MIT GitHub repository of Relative Strength Index

BodyOutlier A003

by ruckard
13 stars

BodyOutlier A003 is a mean-reversion trading strategy designed for automated execution via Zignaly alerts. It identifies candlestick body outliers to place limit orders, buying at the low of unusually large bullish candles or selling at the high of large beari

Strategy v5 Candlestick patternsMean reversion
Updated 1 year ago · None stated GitHub repository of BodyOutlier A003
12 stars

Identifies three-candle Fair Value Gaps (FVG) and trades their initial retests in the direction of an exponential moving average trend filter. Long positions trigger when price enters a recent bullish imbalance from above while trading above the EMA; short pos

Strategy v5 SMC / ICT / price actionTrend
Updated 4 months ago · None stated GitHub repository of BTC FVG Retest Strategy

ICT Cursor

by dbruce1990
12 stars

ICT Cursor is a price action and Smart Money Concepts indicator that identifies 3-bar swing highs and swing lows on the main chart. It dynamically tracks and categorizes swing points into active levels, swept liquidity points, and closed-through structure brea

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of ICT Cursor

我的腳本

by blockplusim
12 stars

This indicator plots a seven-period simple moving average of the close on the price chart. It colors the line green when the average is higher than its value one bar earlier and red when it is lower or equal. There are no user inputs, so the length, source, an

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of 我的腳本

NFI v7.2

by koradiyakaushal
12 stars

NFI v7.2 is an overlay study adapted from NostalgiaForInfinity V7 for Freqtrade. The strategy declaration is commented out, so this file does not place orders or define exits. Visible settings choose an informative timeframe, a master symbol that defaults to B

Indicator v4 Moving averages
Updated 5 years ago · MIT GitHub repository of NFI v7.2

Fibonacci strategy

by JoelPasapera
11 stars

This strategy plots a Fibonacci retracement of the previous day's high-low range on the price chart. It places a single long limit order at that level when the bar hour matches the chosen entry hour and the close is below the level. Position size follows the l

Strategy v6 Support & resistanceSessions & time
Updated 5 months ago · Apache-2.0 GitHub repository of Fibonacci strategy

5 EMAs

by hirawatt
11 stars

5 EMAs calculates and plots five Exponential Moving Averages derived from five configurable timeframes directly onto the main price chart. It also plots the high and low lines fetched from an additional custom timeframe, accompanied by a small on-screen table

Indicator v4 Moving averagesTrend Repaints
Updated 2 years ago · MIT GitHub repository of 5 EMAs

BTE Acc AO SMIO

by f-cksociety
11 stars

This script provides an indicator-based backtesting engine framework that simulates trade entries, exits, and filtering directly on the price chart. It evaluates selected entry rules and multi-layered filters, including moving average trends, volume increases,

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of BTE Acc AO SMIO
10 stars

My Macro Cycle Indicator plots daily and weekly simple and exponential moving averages on the price chart, plus Pi Cycle and Mayer Multiple levels derived from the 200-day average. Optional toggles add support-band fills, a Keltner channel, CME futures gaps, a

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · None stated GitHub repository of My Macro Cycle Indicator

This indicator projects daily Average True Range (ATR) support and resistance levels onto the main price chart based on the daily open price. It calculates upper and lower ATR levels along with outer ATR band lines using a configurable multiplier. Dynamic hori

Indicator v4 Volatility & bandsSupport & resistance Repaints
Updated 5 years ago · GPL-3.0 GitHub repository of Chad's Average True Range ATR (@tradeprophet)
9 stars

Adaptive Supertrend is an overlay indicator that dynamically adjusts its Supertrend band width using a composite conviction score. Conviction is derived from ATR percentile ranking, trend force from EMA distance, and chop detection, narrowing the bands during

Indicator v6 TrendVolatility & bands
Updated 2 days ago · MIT GitHub repository of Adaptive Supertrend

ACE Squeeze

by JasonTeixeira
9 stars

ACE Squeeze plots a cycle-based squeeze oscillator in a separate pane. It builds a histogram and an optional cycle phase line from a base cycle length, sensitivity, and price source, then can adjust the reading with volatility, volume delta, relative range exp

Indicator v6 Oscillators & momentumVolatility & bands
Updated 13 days ago · Custom licence GitHub repository of ACE Squeeze
9 stars

Automatic Trendline [Metrify] identifies and draws dynamic support and resistance trendlines directly on the price chart. It detects swing pivots over a configurable lookback window, filtering candidate trendlines through constraints including maximum violatio

Indicator v6 Support & resistanceTrend
Updated 4 months ago · MIT GitHub repository of Automatic Trendline [Metrify]

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