Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 22)

Scripts written for Pine Script version 6, the current version of TradingView's language. They paste into the Pine Editor and run as they are.

Pine scripts4,367
Code shown here2,412open licence
Updated in a year4,021
No repaint flag3,857

Pine Script v6: Indicators, Strategies and Libraries

Bollinger Bands

by Studentcodee
1 stars

This strategy plots Bollinger Bands directly on the price chart. It computes the middle band as the simple moving average of the close price over the input length and the upper and lower bands by multiplying the standard deviation by the multiplier and adding

Strategy v6 Volatility & bandsMoving averages
Updated 1 year ago · None stated GitHub repository of Bollinger Bands

EA_2

by equitymarkets
1 stars

EA_2 is a basic strategy template that generates trade entries based on price crossovers with a Simple Moving Average. It monitors a fast moving average relative to a selected price source, entering a long position when the price crosses above the moving avera

Strategy v6 Moving averagesTrend
Updated 1 year ago · MIT GitHub repository of EA_2

MTF Moving Average

by itsmeterada
1 stars

Plots a simple or exponential moving average calculated on a user-selected timeframe over the current chart. Inputs set the timeframe, average type, length, source, line colour, thickness and transparency. An optional label on the last bar shows the timeframe,

Indicator v6 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of MTF Moving Average
1 stars

A pivot breakout strategy designed for the S50 futures on a 30-minute chart. It detects swing highs and lows from left and right bar counts and places stop entries just beyond them. Stops sit one ATR beyond the pivot, targets are ATR multiples set by a risk to

Strategy v6 BreakoutSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of S50 TFEX Strategy With ATR
1 stars

A separate-pane indicator that plots the change in a chosen price source over a set number of trading sessions, as percent or points. Columns are green for gains and red for losses, with aqua and fuchsia highlighting changes above or below two configurable thr

Indicator v6 Oscillators & momentumVolatility & bands
Updated 1 year ago · MIT GitHub repository of Price Change History

OTHERS.D MTPI

by Mikelkulla
1 stars

This strategy computes the direction of the altcoin market via the Others.D MTPI index. It merges outputs from Median Supertrend, FDI-Adaptive Supertrend, Hyperbolic Tangent Volatility Stop, Dema AFR, and Normalized KAMA Oscillator to generate long or short si

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of OTHERS.D MTPI

RSI Pattern Strategy

by fuyuanyuan
1 stars

This script combines five distinct RSI pattern setups with volume ratio filters to generate trading signals. It identifies RSI double bottoms, hooks, bullish divergences, oversold bounces, and midline breakouts to form long conditions, alongside overbought dow

Strategy v6 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of RSI Pattern Strategy

COT Financial

by ivansoft
1 stars

An indicator in a separate pane that plots Commitment of Traders financial report metrics for the chart symbol, including open interest and dealer, asset manager, leveraged funds and other reportable positions. Settings pick the metric, the direction, a select

Indicator v6
Updated 1 year ago · None stated GitHub repository of COT Financial

Swing Trader Strategy

by MuhammadHussain07
1 stars

Swing Trader Strategy is a long-only strategy that buys when the MACD line crosses above its signal line during a chosen date range. It exits when the close falls below a trailing stop measured from the highest close since entry, or below a fixed percentage st

Strategy v6 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Swing Trader Strategy
947 stars

The Fibonacci Weighted Moving Average calculates a trend-following line on the price chart using Fibonacci sequence numbers as weights. Newer data points receive larger Fibonacci weights to increase responsiveness compared to standard simple moving averages. I

Indicator v6 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Fibonacci Weighted Moving Average
575 stars

This indicator scans a pasted list of symbols for ICT fair value gaps and lists long and short matches in an on-chart table. It draws gap boxes on the price chart and can close them partially when price fills part of the gap. The user chooses among six scannin

Indicator v6 SMC / ICT / price actionScreeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Fair Value Gap (FVG) Scanner
361 stars

Forven S01512 — Monday Drift is a calendar-based long trading strategy designed to exploit time-based recurring market patterns. It tracks UTC calendar days and hours to enter a long position at a specified day and hour, holding it for a fixed duration until a

Strategy v6 Sessions & time
Updated 2 days ago · AGPL-3.0 GitHub repository of Forven S01512 - Monday Drift
318 stars

This indicator plots fast and slow moving averages using either EMA or SMA directly on the main chart to identify trend direction and crossovers. It calculates an ATR-based trailing stop line derived from the highest high minus a multiplied ATR value over a co

Indicator v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of TVT MA Crossover with Stop Loss
257 stars

This overlay strategy targets one-minute ES futures and plots volume-weighted moving-average bands from the open, scaled by a standard-deviation multiple, plus a slower band from ten-minute opens. A higher-timeframe exponential moving average can filter trades

Strategy v6 Moving averagesVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of ES - Futures 1M No Repaint

Daily Bias + FVG Strategy

by TradersPost
228 stars

This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto

Strategy v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Daily Bias + FVG Strategy

This tutorial strategy demonstrates lower-timeframe multi-timeframe functionality in Pine Script using request.security_lower_tf. It evaluates synthetic lower-timeframe 1-minute close prices within each chart bar to calculate the intra-bar price range percenta

Strategy v6 Volatility & bands
Updated 2 days ago · Apache-2.0 GitHub repository of PineForge MTF tutorial — lower-TF intra-bar range
105 stars

This overlay strategy looks for gold scalps from break of structure and change of character. It enters long when a bullish break, a bullish character change, and an optional volume filter align, and short on the opposite set. Optional RSI levels can block trad

Strategy v6 SMC / ICT / price actionOscillators & momentum Repaints
99 stars

This indicator plots Price Headley's Acceleration Bands on the price chart. It builds a middle line as a simple moving average of close, plus upper and lower bands from simple moving averages of highs and lows widened by a factor times the bar's high-low range

Indicator v6 Volatility & bandsMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Acceleration Bands (ACCBANDS)
92 stars

This overlay indicator draws horizontal liquidation lines for HYPE from a baked-in snapshot of Hyperliquid long and short positions. It plots the ten closest long liquidation prices in red and amber and the ten closest short prices in green and cyan, with the

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

BTC MACD Basic Tests

by iamrichardD
57 stars

BTC MACD Basic Tests implements a Pine Script unit-testing framework designed to validate components of a long-only Bitcoin MACD trading system. It constructs structured test cases to evaluate mock functions for MACD crossover calculations, volume threshold ch

Strategy v6 Oscillators & momentumTrend
Updated 1 year ago · Apache-2.0 GitHub repository of BTC MACD Basic Tests

Trading Sessions

by iamc1oud
56 stars

Trading Sessions is an overlay indicator that highlights major market trading sessions such as Tokyo, London, and New York directly on the price chart. It draws customizable session boxes along with optional open and close price lines, average session prices,

Indicator v6 Sessions & time
Updated 2 months ago · None stated GitHub repository of Trading Sessions

Bgcolor Example

by dcaoyuan
55 stars

Bgcolor Example is a minimal demonstration indicator written in Pine Script v6 that visualises bar polarity across the price chart. It checks whether the current close is lower than the open and dynamically tints the chart background red for bearish bars or gr

Indicator v6 Candlestick patterns
Updated 6 months ago · Apache-2.0 GitHub repository of Bgcolor Example
53 stars

This indicator analyzes historical candle direction and price range over a configurable lookback window to gauge market trend. It categorizes trend direction using candle count, price range sum, or both. Signals are filtered using a Simple Moving Average to en

Indicator v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of Candle Counter + MA + RSI + Mode
47 stars

This indicator calculates and plots Acceleration Bands directly on the main price chart. It computes simple moving averages of high, low, and close prices using circular buffers. The middle line displays the close moving average, while upper and lower envelope

Indicator v6 Volatility & bandsMoving averages
Updated 8 months ago · MIT GitHub repository of Acceleration Bands (ACCBANDS)

Daily Floor Pivots

by TamaraKGreen
46 stars

The Daily Floor Pivots indicator calculates standard daily pivot points alongside support and resistance levels up to five tiers. In addition to standard pivot lines, it projects Fibonacci Golden Zone channels between adjacent pivot levels such as PP to R1 or

Indicator v6 Support & resistance Repaints
Updated 8 weeks ago · None stated GitHub repository of Daily Floor Pivots

Natal & Transit Planetary Aspect Table

by blueprintresearch-dev
42 stars

Natal & Transit Planetary Aspect Table displays an on-screen table comparing natal planetary positions with live or historical transit positions based on financial astrology principles. It calculates positions using geocentric or heliocentric coordinates and h

Indicator v6 Screeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of Natal & Transit Planetary Aspect Table

COT Net Positions

by ChartsLector
41 stars

This indicator fetches and plots weekly Commitment of Traders (COT) net position data in a separate pane using TradingView's official COT library. It displays positioning breakdowns for selected futures markets under either Legacy or Financial (TFF) reporting

Indicator v6 Volume
Updated 4 days ago · None stated GitHub repository of COT Net Positions

Macro VN Indices Research

by Thanhtran-165
38 stars

This indicator maps a composite macro risk score onto Vietnamese indices and sectors in a separate pane. It combines liquidity stress, curve shape, the international yield spread, and the ten-year versus policy-rate spread, then groups regimes with hysteresis.

Indicator v6 Screeners & dashboards
Updated 5 weeks ago · None stated GitHub repository of Macro VN Indices Research

Zen ABR Range Bands

by Zen-Tim
29 stars

The Zen ABR Range Bands indicator calculates an 8-bar average range from high-low differences and an exponential moving average of close prices. It plots the EMA on the price chart along with optional bands at multiples of the ABR (1x, 2x, 3x, 4x) centered on

Indicator v6 Moving averagesVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen ABR Range Bands
26 stars

This indicator plots the instrument close in a separate pane. The source imports a user library as Lib but never calls it, so the import does not change the plotted series. There are no inputs, alerts, or trade signals, and it does not define entries, exits, s

Indicator v6
Updated 2 months ago · AGPL-3.0 GitHub repository of Feature Matrix - library import
23 stars

This indicator builds a global liquidity composite in a separate pane. It requests monthly M2 series for the United States, euro area, China and Japan, normalizes each against a simple moving average, and combines them with user weights. Settings choose whethe

Indicator v6
Updated 4 weeks ago · Custom licence GitHub repository of Global Liquidity Composite

Imports

by ferranbt
21 stars

This indicator demonstrates a library import. It imports a library named mylib under the alias lib, calls the function add with the constants one and two, and plots the returned value. It does not read price, volume, or time, and it does not produce trading si

Indicator v6
Updated 7 weeks ago · MPL-2.0 GitHub repository of Imports
20 stars

This indicator combines RSI, Awesome Oscillator (AO), and Stochastic readings to calculate divergence and momentum signals. It identifies regular and hidden divergences while analyzing price pivots, momentum thresholds, and AO filters. The script draws in a se

Indicator v6 Oscillators & momentumDivergence
Updated 5 days ago · MIT GitHub repository of zaBor RSI+AO+Stoch indicator

This indicator detects Smart Money Technique (SMT) intermarket divergences across multiple timeframes, ranging from one minute to one week. It compares the current chart symbol against up to two benchmark symbols to identify non-confirmations in swing highs an

Indicator v6 SMC / ICT / price actionDivergence
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz Multi-Timeframe SMT + Timecycle Scanner
16 stars

This strategy plots Donchian channels, trailing stops, and profit targets directly on the price chart. It enters breakout trades using a 55-bar Donchian channel and sizes positions according to an ATR-based risk percentage per unit. The system adds units as pr

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 10: Profit Targets

Alighten Pattern A

by alighten-dev
14 stars

Alighten Pattern A is an overlay indicator that calculates market structure pivots and identifies price patterns directly on the main price chart. It plots a ZigZag line to track price highs and lows, rendering horizontal dashed levels and directional signal m

Indicator v6 Support & resistanceTrend Repaints
Updated 2 weeks ago · None stated GitHub repository of Alighten Pattern A

Index Intraday Analyst

by chris-c-thomas
14 stars

Index Intraday Analyst overlays CBOE cash indices such as SPX, NDX, RUT, and DJX. It plots a multi-EMA ribbon, a session-anchored TWAP with standard-deviation bands, and session levels such as prior-day high, low, and close, the opening range, and the high and

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · MIT GitHub repository of Index Intraday Analyst

Chart Patterns

by deepentropy
13 stars

Chart Patterns is a Pine Script v6 library designed to scan for and render technical chart patterns directly on the price chart. It defines custom user-defined types to configure scanning parameters, such as Zigzag pivot offsets, error ratios, flat ratios, and

Library v6 Repaints
Updated 6 months ago · MIT GitHub repository of Chart Patterns

CISD Detector

by dbruce1990
12 stars

This indicator detects Change in State of Delivery levels on the price chart. It tracks swing highs and lows, looks for a swing sweep, collects the delivery candles between those swings, and marks that sequence's opening price. A level is drawn only after a cl

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

This indicator identifies and visualizes key support and resistance heatmap zones directly on the price chart. Using closed one-hour price data, it evaluates multi-scale pivots, liquidity clusters, relative volume, and round-number resonances to score structur

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 7 weeks ago · MIT GitHub repository of 加密货币1小时关键价位热力图 V2

Estrategia EMA and BARS

by JoelPasapera
11 stars

This strategy generates long trade entries based on an exponential moving average crossover on the main price chart. It calculates two customizable EMAs and executes a buy order when the shorter moving average crosses above the longer moving average. Rather th

Strategy v6 TrendMoving averages
Updated 5 months ago · Apache-2.0 GitHub repository of Estrategia EMA and BARS

Adaptive Fair Value Cloud calculates a volatility-adaptive fair value channel around a selectable centerline, such as KAMA, EMA, linear regression, or VWMA. It blends ATR and mean deviation with volatility percentiles and trend sensors, including ADX, Efficien

Indicator v6 Volatility & bandsTrend
Updated 3 days ago · MIT GitHub repository of Adaptive Fair Value Cloud [WavesUnchained]

Nexural OrderFlow Matrix

by JasonTeixeira
9 stars

Nexural OrderFlow Matrix is an order flow visualization tool that plots a detailed heatmap table and stacked imbalance bars in a separate pane. It calculates volume metrics using lower timeframe volume delta data, displaying per-candle metrics such as Delta, D

Indicator v6 VolumeScreeners & dashboards
Updated 2 weeks ago · Custom licence GitHub repository of Nexural OrderFlow Matrix

More Pine Script Categories

Browse the whole Pine Library

Third-party code. ForexR lists open-source Pine scripts from GitHub; it did not write, test or endorse them, and their summaries are generated automatically from each script's code and README. Indicators describe the past, and a strategy's backtest can look better than live trading. Check a script on a demo account before you rely on it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

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.

Trade Your Charts With a Regulated Broker

Compare regulated brokers on platforms, spreads, minimum deposit and leverage.

Compare brokers