Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 66)

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

7 stars

BTC M2 Global Deviation [MIT] measures and visualizes the correlation between global fiat M2 money supply and Bitcoin price. It aggregates M2 economic data across major national central banks, converts all currencies to USD, and normalizes both the global M2 t

Indicator v6 TrendVolatility & bands
Updated 3 months ago · None stated GitHub repository of BTC M2 Global Deviation [MIT]
4 stars

The RSI Divergence indicator plots the Relative Strength Index in a separate pane with horizontal lines for overbought at 70, mid at 50, and oversold at 30. It detects bullish divergence when price forms a lower low but RSI forms a higher low, marked by a gree

Indicator v6 Oscillators & momentumDivergence
Updated 2 months ago · MIT GitHub repository of RSI Divergence [trugurpala]
2 stars

This overlay indicator tracks confirmed pivot highs and lows and lets those levels drift by a fraction of a 200-period ATR when no new pivot appears. When price crosses the upper level it extends the structure line, resets the opposite count, and prints a numb

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 8 months ago · None stated GitHub repository of Angle Market Structure [BigBeluga]

Jurik Moving Average (JMA)

by mushroom-men-Trading
2 stars

This indicator calculates and plots the Jurik Moving Average directly on the main price chart. It uses an adaptive smoothing algorithm that dynamically adjusts to market volatility to reduce lag while minimizing overshoot. The script does not generate buy or s

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Jurik Moving Average (JMA)
1 stars

Calculates support and resistance breakouts by combining key level testing with smart flow filters and Average Trade Size (ATS) proxy monitoring. The indicator tracks price tests against consolidation ranges, lower timeframe volume, order flow delta, and volum

Indicator v6 BreakoutVolume
Updated 4 days ago · None stated GitHub repository of Breakout Finder Intelligent

Map Regime Tracker

by pineforge-4pass
1 stars

The Map Regime Tracker strategy evaluates market structure using a 20-period exponential moving average and a 50-period simple moving average. It stores regime thresholds inside a map object initialized on the first bar. When the fast EMA is above the slow SMA

Strategy v6 TrendOscillators & momentum
Updated 7 days ago · Apache-2.0 GitHub repository of Map Regime Tracker

P_err_wrong_arg_type

by GammaExpansion
1 stars

This indicator is a Pine Script v6 fixture that calls the built-in simple moving average with a length of ten and plots the result in a separate pane. The first argument is the string close rather than a price series, so the call does not match the expected ar

Indicator v6 Moving averages
Updated 7 days ago · MIT GitHub repository of P_err_wrong_arg_type
1 stars

A deliberately minimal test strategy that goes long every fixed number of bars while flat, with no signal logic. Each trade uses a plain ATR-based stop and an ATR-based target, with the bar spacing and both ATR multiples adjustable. It exists to check that ord

Strategy v6 Volatility & bands
Updated 8 days ago · GPL-3.0 GitHub repository of P0 Rebuild Stage 0 Sanity Check

DEPV2 Debug S21

by YuceSezar89
1 stars

DEPV2 Debug S21 is a multi-symbol crypto research and evaluation tool plotted in a separate pane. It monitors up to 20 Binance cryptocurrency perpetual pairs by analyzing price action across four distinct signal engines: trend, momentum, volatility, and volume

Indicator v6 Screeners & dashboardsTrend Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 Debug S21

Williams Fractals

by morindok
1 stars

Williams Fractals identifies multi-bar pivot highs and pivot lows based on Bill Williams' classic fractal logic. It evaluates price action across a user-defined period to detect local high and low turning points, plotting visual markers directly above or below

Indicator v6 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Williams Fractals

Apex Nexus Flip Engine v10

by vedkanani123
1 stars

A trend flip indicator on the price chart with BUY and SELL labels. A zero-lag trail is built from ATR and an optional volume-weighted source, and it widens in choppy conditions. Flips need to pass gates for choppiness, baseline slope, volatility expansion, ef

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Apex Nexus Flip Engine v10

This strategy samples RSI momentum across a customizable list of federated ticker symbols to build a consensus ratio. When the proportion of assets with RSI above 50 meets or exceeds a selected rigor threshold (Loose, Standard, or Sovereign), it enters a long

Strategy v6 Oscillators & momentumScreeners & dashboards
Updated 2 months ago · None stated GitHub repository of TN Federated Consensus Sovereign

Open Interest

by ivansoft
1 stars

Shows futures open interest in a separate pane by requesting the matching open interest series for the chart's symbol. For crypto symbols it draws open interest as candles; for other symbols it draws a step line coloured by whether the latest close rose. On in

Indicator v6 Volume
Updated 1 year ago · None stated GitHub repository of Open Interest

Q-Trend + KVO Strategy

by TradersPost
228 stars

This strategy combines the ATR-banded Q-Trend indicator with the Klinger Volume Oscillator (KVO) to execute confluence trades. It enters long when a Q-Trend buy trigger aligns with a positive KVO value and a bullish candle confirmation, taking short trades und

Strategy v6 TrendVolume
Updated 3 months ago · None stated GitHub repository of Q-Trend + KVO Strategy
99 stars

This indicator calculates a second-order Chebyshev Type II lowpass filter and plots the result on the price chart. Length sets the cutoff period, and stopband attenuation in decibels controls how strongly higher-frequency components are reduced. The source inp

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Chebyshev Type II Filter (CHEBY2)

This indicator computes the dominant cycle period using Ehlers homodyne discriminator. It applies exponential smoothing with warmup compensation for stable initialization and FIR/IIR filtering stable during market volatility. The smoothed period estimate is pl

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of HOMOD: Homodyne Discriminator Dominant Cycle

This strategy enters long or short on a Donchian channel break and sizes each unit by risking a percentage of equity against an ATR stop. It adds units as price advances by a fraction of ATR, up to a set maximum. A three-tier time exit uses RSI: fading momentu

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 42: Momentum-Gated Time

Market State Engine classifies the current market into nine states including balance, compression, bull and bear expansion, pullback, exhaustion, and transition. It computes orthogonal axes for structural regime, energy phase, value location relative to adapti

Indicator v6 TrendSupport & resistance Repaints
Updated 3 days ago · MIT GitHub repository of Market State Engine [WavesUnchained]

Bull/Bear Volume Diagram

by eddiebelaval
7 stars

The Bull/Bear Volume Diagram indicator calculates and displays directional volume in a separate pane below the price chart. It categorizes volume based on candle direction, plotting positive histogram columns for bullish bars and negative histogram columns for

Indicator v6 VolumeMoving averages
Updated 3 months ago · None stated GitHub repository of Bull/Bear Volume Diagram

RSI Mean Reversion

by trugurpala
4 stars

The strategy identifies mean reversion opportunities using the RSI indicator. It calculates RSI with customizable length and generates long entries on RSI crossover above the oversold level and short entries on crossover below the overbought level. Entries are

Strategy v6 Mean reversionOscillators & momentum
Updated 2 months ago · MIT GitHub repository of RSI Mean Reversion

Jurik Volatility (JVOLTY)

by mushroom-men-Trading
2 stars

Jurik Volatility calculates an adaptive measure of market volatility based on price distance relative to dynamic upper and lower bands. It normalizes volatility variations over time using adaptive smoothing constants and power transformations, allowing it to a

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Jurik Volatility (JVOLTY)

CHOCH + BOS

by skipp-dev
1 stars

Calculates market structure breaks by identifying Change-of-Character (ChoCH) and Break-of-Structure (BOS) levels on the price chart using swing high and swing low pivots. It features an integrated volume filter requiring breakout volume to exceed an SMA multi

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 days ago · None stated GitHub repository of CHOCH + BOS

Matrix Eigen PCA

by pineforge-4pass
1 stars

This strategy computes a 2x2 covariance matrix from short-term differences in close-open and high-low ranges. It extracts the largest eigenvalue of the matrix as a volatility measure and compares it to its own simple moving average. When the largest eigenvalue

Strategy v6 Volatility & bandsOscillators & momentum
Updated 7 days ago · Apache-2.0 GitHub repository of Matrix Eigen PCA

P_err_wrong_arity

by GammaExpansion
1 stars

P_err_wrong_arity is a minimal Pine Script v6 indicator written as a test fixture for compiler parsing and arity validation. It attempts to call the built-in simple moving average function using only the close price without providing the required length argume

Indicator v6 Moving averages
Updated 7 days ago · MIT GitHub repository of P_err_wrong_arity
1 stars

A swing strategy that goes long when the SuperTrend (period 10, multiplier 5) is bullish, price is above a rising 200-period EMA, and the long side is enabled. Shorts follow the mirror rules but are switched off by default. An optional partial exit closes a se

Strategy v6 TrendMoving averages
Updated 8 days ago · GPL-3.0 GitHub repository of Pro-Swing System: 200 EMA and SuperTrend

DEPV2 DEBUG S22

by YuceSezar89
1 stars

DEPV2 DEBUG S22 is a multi-symbol crypto indicator that monitors twenty perpetual futures pairs across four distinct market dimensions: trend, momentum, volatility, and volume. It evaluates signals using simultaneous consensus or sequential chains, requiring a

Indicator v6 Screeners & dashboardsTrend Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S22

Apex Nexus Flip Engine v11

by vedkanani123
1 stars

A trend flip indicator on the price chart with BUY and SELL labels. It builds a zero-lag trail from an ATR multiple and an optional volume-weighted source, with an evasive mode that pushes the trail away during small pullbacks. Flips pass gates for choppiness,

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Apex Nexus Flip Engine v11
1 stars

This multi-factor consensus strategy aggregates directional votes across five independent analytical agents: dual EMA trend alignment (50/200), RSI momentum, Bollinger Bands baseline position, intraday VWAP, and higher-timeframe daily EMA 50 trend. It executes

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of TN Federated Swarm Voting v6

Opening High Low

by ivansoft
1 stars

Records the high and low of the candle that begins a chosen session window and plots them as circles on the price chart, holding them until the next session start. The session is an input, defaulting to a five-minute window starting at 10:30. It works on intra

Indicator v6 Sessions & timeSupport & resistance
Updated 1 year ago · None stated GitHub repository of Opening High Low

Quick Flip Scalper

by TradersPost
228 stars

This strategy executes an opening-range liquidity fade based on the first candle of a session. It qualifies the opening range against the daily ATR to confirm manipulation or liquidity spikes. If qualified, it searches for reversal candlestick patterns, such a

Strategy v6 Sessions & timeCandlestick patterns
Updated 3 months ago · None stated GitHub repository of Quick Flip Scalper

Choppiness Index

by mihakralj
99 stars

The script plots the Choppiness Index in a separate pane. It sums true range over a lookback and compares that sum with the highest-high to lowest-low range, then scales the result from 0 to 100. Lower readings indicate a trending market and higher readings in

Indicator v6 TrendVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Choppiness Index

This indicator estimates the dominant market cycle length in bars using John Ehlers’s Hilbert Transform method. It smooths the chosen source, builds in-phase and quadrature components, and converts their phase angle into a period that is clamped between 6 and

Indicator v6
Updated 8 months ago · MIT GitHub repository of HT_DCPERIOD: Hilbert Transform Dominant Cycle Period

This strategy implements a Donchian breakout trend-following system with volatility-adaptive profit targets. It enters long or short on 55-period Donchian channel breakouts, sizes positions by ATR risk, and pyramids up to four units as price advances. Stop los

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 43: Volatility Adaptive

Calculates continuous structural market bias by detecting swing high and low pivots (higher highs, higher lows, lower highs, and lower lows) using configurable left and right bar lookbacks. It assigns weighted values to classified pivots within a rolling windo

Indicator v6 SMC / ICT / price actionTrend
Updated 3 days ago · MIT GitHub repository of Market Structure Advanced [WavesUnchained]
7 stars

The Capital Rotational Event (CRE) indicator tracks capital flows and rotational momentum between two selectable assets, defaulting to SPY and GLD. It calculates a relative strength ratio between the target assets, smoothed by a moving average, along with a mo

Indicator v6 Oscillators & momentumMoving averages
Updated 3 months ago · None stated GitHub repository of Capital Rotational Event (CRE)

RSI OB/OS [trugurpala]

by trugurpala
4 stars

This indicator calculates a Relative Strength Index (RSI) with dynamic gradient coloring in a separate pane. It tracks defined overbought and oversold thresholds, dynamically adjusting the line color according to momentum strength. Background shading highlight

Indicator v6 Oscillators & momentum
Updated 2 months ago · MIT GitHub repository of RSI OB/OS [trugurpala]
2 stars

Bear Market Probability Model plots a bear-market probability line in a separate pane. Its header describes a score built from four weighted groups: macroeconomic conditions, technical analysis, market sentiment, and market breadth. Users set warning and dange

Indicator v6 Screeners & dashboardsOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Bear Market Probability Model

CHOCH + BOS Strategy

by skipp-dev
1 stars

This strategy identifies market structure shifts, specifically Change of Character (ChoCH) and Break of Structure (BOS), on the main price chart. It triggers entries based on swing pivot breakouts with an optional volume filter and moving average confirmation.

Strategy v6 SMC / ICT / price actionTrend
Updated 4 days ago · None stated GitHub repository of CHOCH + BOS Strategy

Mean Reversion Bollinger

by pineforge-4pass
1 stars

This strategy combines Bollinger Bands and the Relative Strength Index (RSI) to execute mean-reversion trades directly on the main price chart. It opens long positions when price drops below the lower band with an oversold RSI reading, and opens short position

Strategy v6 Oscillators & momentumVolatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of Mean Reversion Bollinger

P_fmt_annotations

by GammaExpansion
1 stars

This indicator is a Pine Script v6 formatting fixture rather than a trading tool. It declares a user-defined Point type with bar index and price fields, plus a function that doubles a float. On each bar it doubles the close, stores the bar index and close in a

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_fmt_annotations

Quantum Trend Signal

by rosijay17-cmd
1 stars

An overlay indicator that plots a fast and a slow EMA, defaulting to 21 and 55, and shades the chart background by which one is higher. A BUY triangle appears when the fast EMA crosses above the slow one while RSI is above 55 and ATR exceeds a fraction of its

Indicator v6 TrendMoving averages
Updated 8 days ago · GPL-3.0 GitHub repository of Quantum Trend Signal

DEPV2 DEBUG S23

by YuceSezar89
1 stars

DEPV2 DEBUG S23 is a Pine Script v6 indicator that draws in a separate pane and watches up to twenty user-selected Binance perpetual symbols. It combines four signal classes—trend, momentum, volatility, and volume—through a single class, simultaneous agreement

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S23

Parabolic SAR

by ivansoft
1 stars

Plots the Parabolic SAR with the built-in function using a start of 0.02, increment of 0.02 and maximum of 0.2, drawn as crosses in a separate pane. It also includes a hand-written Pine version of the same calculation, plotted with the same settings, so the tw

Indicator v6 Trend
Updated 1 year ago · None stated GitHub repository of Parabolic SAR

Raschke Patterns

by TradersPost
228 stars

This overlay indicator marks Linda Raschke short-term bar setups on the price chart. It flags Turtle Soup and Turtle Soup plus one false breakouts of a prior extreme, 80-20 bars, inside bars, failed inside-bar breakouts, outside up and down bars, NR4 and NR7 c

Indicator v6 Candlestick patternsBreakout Repaints
Updated 3 months ago · None stated GitHub repository of Raschke Patterns

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