Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 42)

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

1 stars

This price-chart strategy builds a prior-day floor pivot from yesterday’s high, low, and close, plus the related resistance and support levels. It looks for a break above that pivot when the prior close was within a set percentage below it, and can require pri

Strategy v6 Support & resistanceBreakout
Updated 4 months ago · None stated GitHub repository of Pivot Breakout (NON-REPAINT)
1 stars

This indicator maps Smart Money Concepts (SMC) elements directly onto the price chart. It identifies swing highs and swing lows to track market structure (HH, HL, LH, LL), Break of Structure (BoS), and Change of Character (CHoCH) using either pivot or session

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of SMC Market Structure Indicator

XAUUSD-Asia Reversion Strategy

by riegodavid-git
1 stars

A gold strategy built on fractal sweeps, fair value gaps and a short-period RSI. It fades extended moves, using RSI overbought and oversold gates and an overextension timer, and places limit orders that cancel after a set number of bars. The stop is ATR-based

Strategy v6 Mean reversionSMC / ICT / price action
Updated 4 months ago · None stated GitHub repository of XAUUSD-Asia Reversion Strategy

EMA Crossover

by rubbermetal
1 stars

EMA Crossover plots a fast and a slow exponential moving average, fills the space between them green or red by direction, and marks each cross with a Long or Short label. A background tint appears when the gap between the averages exceeds a multiple of ATR. Op

Indicator v6 TrendMoving averages
Updated 4 months ago · MPL-2.0 GitHub repository of EMA Crossover
1 stars

This strategy executes long trades based on directional candle signals fetched from a custom secondary timeframe. It evaluates bullish or bearish candle alignment on the requested timeframe and enters a long position when the state turns bullish. Position sizi

Strategy v6 Trend
Updated 4 months ago · MIT GitHub repository of MTF LTF Position State

Deep Trades Whales v4

by shubhamtaywade82
1 stars

Deep Trades Whales v4 is an indicator that detects large institutional trades by analyzing volume spikes against historical percentiles and Z-scores. It identifies whale activity through iceberg absorption patterns that require proximity to prior swing highs o

Indicator v6 VolumeVolatility & bands Archived
Updated 5 months ago · None stated GitHub repository of Deep Trades Whales v4
1 stars

This price-chart indicator builds a right-side volume profile and an anchored VWAP for crypto analysis. Lookback, row count, value-area percent, and acceptance bars shape the profile, while daily, weekly, or monthly anchors and a standard-deviation multiplier

Indicator v6 VolumeVolatility & bands
Updated 5 months ago · MIT GitHub repository of Crypto AMT Toolkit v6 Stable Alert

Tactical

by dtheran1
1 stars

A trend and signal overlay for the price chart. It draws a trend line from a moving average, 45 periods by default and selectable as SMA, EMA, WMA, HMA or VWMA, with colour by direction and an optional fill. Long and short signals are labelled progressively as

Indicator v6 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of Tactical
1 stars

This indicator reads the native footprint of each bar to find buy and sell volume imbalances at each price row. A row counts as imbalanced when one side exceeds the other by a set multiplier, checked diagonally or across the row depending on the chosen method,

Indicator v6 Volume
Updated 6 months ago · None stated GitHub repository of Footprint Imbalance Delta

RSI Elite Toolkit

by Focal-QuantAI
1 stars

An indicator in a separate pane built on a 21 period RSI with an optional higher-timeframe version, a selectable smoothing average, adjustable overbought, oversold and midline levels, and highlighted extreme zones. It detects regular and hidden divergences usi

Indicator v6 Oscillators & momentumDivergence
Updated 6 months ago · None stated GitHub repository of RSI Elite Toolkit
1 stars

A separate-pane indicator that estimates net central bank liquidity as the Fed balance sheet minus reverse repo and Treasury account balances, plus the ECB, People's Bank of China and Bank of Japan balance sheets, all converted to dollars. It divides this by c

Indicator v6
Updated 7 months ago · None stated GitHub repository of Central Bank Liquidity to M2

Energy Block V13

by shawnwong84
1 stars

A box breakout strategy whose header comments describe a focus on cutting losing trades. It uses a wider ATR stop, an extra early exit when floating loss exceeds a multiple of the box height, a strict EMA 50 trend filter, a volume filter and a trailing profit

Strategy v6 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Energy Block V13
1 stars

This Bitcoin trading strategy analyzes golden cycle phases using halving dates and custom lengths for pre- and post-halving rises and drops. It plots a rainbow ribbon, supply and demand zones, Ichimoku cloud, geometric mean indicator, and ZigZag lines on the p

Strategy v6 TrendSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle v5

RSI Divergence Detector

by knectardev
1 stars

This indicator detects divergences between the RSI oscillator and price action. It calculates the RSI value using a user-defined length and identifies pivot highs and lows on both the price series and the RSI itself. The script plots bull divergences as potent

Indicator v6 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of RSI Divergence Detector
1 stars

A strategy based on the Open Close Cross idea, where a moving average of the open is compared with one of the close. It offers twelve moving average types, an optional alternate higher-timeframe resolution, a delay offset to limit repainting, and long, short o

Strategy v6 Moving averagesTrend Repaints
Updated 9 months ago · None stated GitHub repository of OCC Strategy Optimized

SFA_MSB_v1

by genesisgrubio39
1 stars

SFA_MSB_v1 is a logic-only Pine Script library providing structural flow analytics outputs. It calculates bullBreak and bearBreak booleans when swing highs or lows are crossed using specified break triggers, with optional ATR confirmation and regime detection.

Library v6 TrendSupport & resistance
Updated 10 months ago · None stated GitHub repository of SFA_MSB_v1

EZ Algo Trader (Beta)

by turnupdigital
1 stars

A strategy on the price chart that combines several external signal sources into entries, using inputs that read other indicators. Each of up to five signals has a name, long and short source and a usage mode. Positions are sized in contracts, with a maximum t

Strategy v6 Screeners & dashboards Repaints
Updated 1 year ago · None stated GitHub repository of EZ Algo Trader (Beta)

Lab-Doi-06

by theteelek
1 stars

Lab-Doi-06 is a price-chart strategy that limits activity to a user-set start and end time. The visible code defines a Hull moving average helper, dashed vertical lines at chosen times, and a seven-day long buy interval described as dollar-cost averaging. It t

Strategy v6 Moving averages
Updated 1 year ago · None stated GitHub repository of Lab-Doi-06

RSI Strategy

by Studentcodee
1 stars

A Pine v6 strategy that trades RSI threshold crosses and draws on the price chart. It computes RSI on the close over a length setting. A long entry fires when RSI crosses up through the oversold level, and a short entry fires when RSI crosses down through the

Strategy v6 Oscillators & momentumMean reversion
Updated 1 year ago · None stated GitHub repository of RSI Strategy

Scalping for S50

by lumduan
1 stars

This strategy plots three EMAs (fast length 8, mid 21, slow 55) on the price chart to identify trend direction. It signals long entries in aligned bull trends confirmed by RSI above 50 and bullish MACD during trading hours, entering when price rises above the

Strategy v6 ScalpingTrend
Updated 1 year ago · None stated GitHub repository of Scalping for S50
1 stars

A strategy file on the price chart that detects pivot highs and pivot lows over a settable fractal length, marks them with triangles and debug labels, and plots the highest and lowest prices over the same length as step lines. It also rounds highs and lows to

Strategy v6 Support & resistance Repaints
Updated 1 year ago · None stated GitHub repository of PriceStep Pivot Strategy

Parabolic SAR

by everget
947 stars

This indicator plots the Parabolic SAR on the price chart using TradingView's built-in SAR function. Direction is long when the SAR sits below the close and short when it sits above. Circles mark the SAR and are colored by that direction. Optional buy and sell

Indicator v6 Trend
Updated 12 days ago · GPL-3.0 GitHub repository of Parabolic SAR

ATR Forward Box

by TradersPost
228 stars

This overlay indicator draws a one-bar-wide box a chosen number of bars ahead of the current bar. The box is centered on the selected price—current close, high, low, or HL2—and extends one ATR above and below that level. It deletes the previous box and creates

Indicator v6 Volatility & bands
Updated 3 months ago · None stated GitHub repository of ATR Forward Box

The AMFM indicator decomposes price movements into amplitude and frequency components using Ehlers' digital signal processing methods. It whitens the derivative as close minus open, then computes AM as the smoothed envelope of the absolute difference over 4 pe

Indicator v6 Volatility & bandsMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of AMFM - Ehlers AM Detector / FM Demodulator

EMA Ribbon Overlay

by iamrichardD
57 stars

Calculates exponential moving averages for fast, pivot, and slow lengths along with optional 50, 100, and 200 simple moving average context lines. It visualizes bullish and bearish ribbon fills on the main price chart alongside MACD calculations to generate ea

Indicator v6 TrendMoving averages
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon Overlay

This indicator combines Chaikin Money Flow (CMF), a SuperTrend baseline, and an Average True Range (ATR) calculation inside a separate sub-pane. It calculates a standard 20-period CMF plotted as a line and colored histogram columns around a zero baseline, trac

Indicator v6 TrendVolume
Updated 6 months ago · Apache-2.0 GitHub repository of Institutional View: CMF & SuperTrend

Fvg Fibo

by Ahmed-GoCode
53 stars

This indicator overlays fair value gaps, market-structure breaks, and two Fibonacci levels on the price chart. It draws bullish, bearish, and mitigated gap zones and can shrink mitigated gaps. It marks break of structure and change of character lines, with an

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · MPL-2.0 GitHub repository of Fvg Fibo

MTF market analysis toolkit

by TamaraKGreen
47 stars

This indicator draws higher-timeframe candles on the price chart so traders can compare a larger timeframe with the current bars. It can show regular candles or Heikin Ashi, with optional automatic timeframe selection and a second level. A stats table and a ti

Indicator v6 Support & resistanceScreeners & dashboards Repaints
Updated 8 weeks ago · None stated GitHub repository of MTF market analysis toolkit

This indicator plots a Bessel-weighted moving average on the price chart. It applies a finite impulse response window whose weights follow a Bessel-style function of a selected order, then normalizes those weights and averages the chosen source over the lookba

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Bessel-Weighted Moving Average (BWMA)

Path of the Planets

by blueprintresearch-dev
42 stars

Path of the Planets is an overlay indicator that calculates and plots planetary longitudes and declinations directly on the price chart using VSOP87, ELP2000-82, and Meeus astronomical algorithms. It supports both geocentric and heliocentric tracking for indiv

Indicator v6 Support & resistanceScreeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of Path of the Planets
29 stars

Zen EMA Pullback Patterns identifies pullback formations relative to an Exponential Moving Average on the price chart. It detects 3-bar pullbacks consisting of three consecutive bearish bars above the EMA or bullish bars below it, as well as 4-bar micro channe

Indicator v6 Moving averagesCandlestick patterns
Updated 2 weeks ago · MIT GitHub repository of Zen EMA Pullback Patterns
26 stars

This feature test indicator calculates and plots a 5-period simple moving average (SMA) using a user-selected price source. It draws the resulting moving average line in a separate window below the main price chart. The primary input setting allows traders to

Indicator v6 Moving averages
Updated 2 months ago · AGPL-3.0 GitHub repository of Feature Matrix - Source Input
23 stars

This strategy evaluates breakout and trend opportunities on the price chart using a weighted composite score of volume, trend, and candlestick structure. It tracks volume spikes, fast and slow EMAs, higher-timeframe EMA trend alignment, opening ranges, and ses

Strategy v6 TrendVolume Repaints
Updated 4 weeks ago · Custom licence GitHub repository of TradingAlpha Point-Clip Strategy
16 stars

This strategy trades Donchian channel breakouts on the price chart and exits on a shorter Donchian channel. It sizes each unit from a percentage of equity and an ATR-based initial stop, then adds units as price moves a set ATR distance, up to a maximum unit co

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 16: Anti-Chop Filters

SPY 0DTE Scalper - 1m

by chris-c-thomas
14 stars

This overlay indicator marks CALLS and PUTS labels on the price chart when a strict boolean gate of price structure, momentum, volatility, breadth, and candle confirmation all pass. It plots an EMA ribbon with cloud fill, session-anchored VWAP and standard-dev

Indicator v6 ScalpingMoving averages
Updated 6 months ago · MIT GitHub repository of SPY 0DTE Scalper - 1m

Calculates a composite Trend Factor ranging from -100 to +100 alongside a confidence score from five weighted evidence blocks: linear regression slope, trend strength metrics (ADX, Efficiency Ratio, R-squared), swing market structure, volatility quality, and e

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of Bayesian Trend Factor [WavesUnchained]

Nexural Transform

by JasonTeixeira
9 stars

Nexural Transform is an oscillator indicator calculated in a separate pane that combines Fisher Transform mechanics with Cumulative Volume Delta momentum. It integrates volume-weighted price transforms, CVD acceleration, and order flow features like absorption

Indicator v6 Oscillators & momentumVolume
Updated 2 weeks ago · Custom licence GitHub repository of Nexural Transform

The Institutional Order Flow Strength Classifier identifies bullish and bearish order blocks triggered by market structure breaks confirmed through pivot highs and lows. It calculates a strength score for each order block based on price displacement and relati

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · MIT GitHub repository of Institutional Order Flow Strength Classifier [LuxAlgo]

LunarTick Levels

by lunarticktrading
7 stars

LunarTick Levels plots key daily reference levels and multi-timeframe simple moving averages directly on the price chart. It highlights key price points including the Opening Print, Previous Day High and Low, and Overnight High and Low. Additionally, it projec

Indicator v6 Support & resistanceMoving averages
Updated 2 weeks ago · None stated GitHub repository of LunarTick Levels

MACD + CMF MTF Signals

by eddiebelaval
7 stars

This indicator calculates Multi-Timeframe Moving Average Convergence Divergence (MACD) and Chaikin Money Flow (CMF) combined in a separate pane. It plots the MACD, signal line, histogram, and an auto-scaled CMF line. Buy markers trigger when a bullish MACD cro

Indicator v6 Oscillators & momentumVolume Repaints
Updated 3 months ago · None stated GitHub repository of MACD + CMF MTF Signals
7 stars

This indicator calculates a customizable weighted blend of the Relative Strength Index and the Money Flow Index in a separate pane. It calculates a smoothed moving average of the hybrid line to show momentum direction, changing the hybrid line brightness when

Indicator v6 Oscillators & momentumVolume
Updated 5 months ago · None stated GitHub repository of Hybrid RSI+MFI + TMA + USDT.D

Capital41 Duo

by damianpitt
6 stars

Capital41 Duo overlays RSI and Williams %R on the price chart and flags agreement between them. It paints a dark green background when both are oversold and a red background when both are overbought, otherwise gray. With turn confirmation enabled, those states

Indicator v6 Oscillators & momentum
Updated 2 months ago · MIT GitHub repository of Capital41 Duo
6 stars

This indicator creates a scanner dashboard on the price chart for 16 symbols including EURUSD, GBPUSD, XAUUSD, BTCUSD and others. It displays institutional bias using colored icons for bullish, bearish, neutral and wait signals. The dashboard supports three co

Indicator v6 Screeners & dashboardsSupport & resistance
Updated 7 months ago · None stated GitHub repository of Institutional Bias Scanner

TheStrat Suite

by 345-strategies
5 stars

TheStrat Suite classifies candles across six configurable timeframes using Rob Smith's TheStrat bar types. It plots inside bars, hammers, shooters, failed 2s and outside bars on the price chart, with magnitude and exhaustion targets, stop levels and full timef

Indicator v6 Candlestick patternsSupport & resistance Repaints
Updated 4 days ago · MPL-2.0 GitHub repository of TheStrat Suite

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