Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 91)

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

TTM Scalper Alert

by mihakralj
99 stars

TTM Scalper Alert marks three-bar pivot highs and lows on the price chart. It treats the prior bar as a pivot high when its high exceeds both neighboring highs, and as a pivot low when its low is below both neighboring lows. An optional setting uses closes ins

Indicator v6 Support & resistanceScalping Repaints
Updated 4 weeks ago · Apache-2.0 GitHub repository of TTM Scalper Alert

Session Isfirstbar VWAP Anchor

by pineforge-4pass
1 stars

A test strategy from a reference corpus that builds a VWAP restarted on the first bar of each trading session, using typical price times volume during market hours. It buys one unit when the close crosses above this session VWAP and closes the long when the cl

Strategy v6 Sessions & timeSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of Session Isfirstbar VWAP Anchor

TTM Trend

by mihakralj
99 stars

TTM Trend plots an exponential moving average of a chosen source on the price chart and colors the line by the direction of its one-bar change. A positive change is green, a negative change is red, and an unchanged value is gray. Optional bands scale with the

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of TTM Trend

Session islastbar flatten

by pineforge-4pass
1 stars

This strategy enters long positions when a 9-period Simple Moving Average (SMA) crosses above a 21-period SMA during active market session hours. To avoid holding positions overnight, it automatically exits all open trades on the final bar of the session using

Strategy v6 Moving averagesSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of Session islastbar flatten

TTM Wave

by mihakralj
99 stars

This indicator plots six MACD histogram channels from exponential moving averages. Fast period is eight and the signal period equals each Fibonacci slow period: 34, 55, 89, 144, 233, and 377. Wave A shows short-term momentum, Wave B medium-term, and Wave C lon

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of TTM Wave

Session Ismarket NYSE RTH Gate

by pineforge-4pass
1 stars

A test strategy from a reference corpus that only trades during regular market hours as reported by the session variable. Within those hours it buys one unit when a 9-period simple moving average crosses above a 21-period one and closes the long on the opposit

Strategy v6 Moving averagesSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of Session Ismarket NYSE RTH Gate

Tukey's Biweight Loss

by mihakralj
99 stars

This indicator calculates the Tukey biweight loss between an actual series and a predicted series over a rolling window. Designed as a robust statistical error metric, it limits the influence of extreme outliers using a configurable threshold parameter. Values

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Tukey's Biweight Loss

Session ispremarket NASDAQ gate

by pineforge-4pass
1 stars

This strategy evaluates premarket session activity on equity markets like NASDAQ. During premarket hours, it enters a long position whenever an intraday candle closes higher than its open price. Once the regular market session opens, the strategy automatically

Strategy v6 Sessions & timeOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of Session ispremarket NASDAQ gate
99 stars

TYPPRICE: Typical Price is a core technical indicator that calculates the typical price for each bar. Computed as the arithmetic average of the bar high, low, and close prices, it serves as a common benchmark and price input for complex indicators like the Com

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of TYPPRICE: Typical Price

Slow Stochastic Cross

by pineforge-4pass
1 stars

A strategy based on the slow stochastic oscillator. Raw %K is smoothed into slow %K and then averaged into %D, with adjustable lengths. It enters long when slow %K crosses above %D while below 80, and short when it crosses below %D while above 20, reversing th

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of Slow Stochastic Cross

Ultimate Oscillator

by mihakralj
99 stars

This indicator calculates the Ultimate Oscillator from buying pressure and true range over three lookback windows. It weights the fast, medium, and slow averages, defaulting to periods of 7, 14, and 28 with weights of 4, 2, and 1, then plots the result on a 0

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ultimate Oscillator

Stochastic RSI

by pineforge-4pass
1 stars

This strategy calculates a smoothed Stochastic RSI oscillator and generates trading signals based on overbought and oversold crossovers. It opens a long position when the %K line crosses above %D while below the oversold threshold, and enters short when %K cro

Strategy v6 Oscillators & momentumMean reversion
Updated 6 days ago · Apache-2.0 GitHub repository of Stochastic RSI

Velocity (VEL)

by mihakralj
99 stars

Velocity (VEL) measures the zero-lag rate of price change smoothed using a Jurik Moving Average (JMA) algorithm. It calculates the raw difference between the current price and the price from a specified lookback period, then applies adaptive JMA smoothing to r

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Velocity (VEL)

Supertrend ADX Filter

by pineforge-4pass
1 stars

The Supertrend ADX Filter strategy calculates Supertrend direction and ADX strength to generate trend signals. It plots the Supertrend line on the price chart in green for bullish and red for bearish. Long entries trigger on Supertrend direction change to bull

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of Supertrend ADX Filter
99 stars

This indicator calculates Adam White's Vertical Horizontal Filter in a separate pane. It divides the close range over the lookback by the sum of absolute bar-to-bar close changes, so higher values indicate a more directional path and lower values a more rangin

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of VHF: Vertical Horizontal Filter

Swing Pivot ATR

by pineforge-4pass
1 stars

Swing Pivot ATR is a trend-breakout strategy that identifies swing highs and lows using pivot points and enters positions on price breakouts. It tracks historical pivot high and low levels, plotting them as steplines directly on the price chart. When price clo

Strategy v6 TrendBreakout
Updated 6 days ago · Apache-2.0 GitHub repository of Swing Pivot ATR

Vortex Indicator

by mihakralj
99 stars

This indicator calculates and plots the positive and negative Vortex Indicator lines, VI+ and VI-, in a separate pane alongside a neutral reference line at 1.0. It uses circular buffers and running sums to compute true range and directional vortex movement eff

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Vortex Indicator
1 stars

This strategy evaluates intraday trading execution for US equities during regular trading hours while handling overnight gaps. It calculates a 14-period Relative Strength Index (RSI) across price history without daily resets. Trades are gated by the market ses

Strategy v6 Oscillators & momentumSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of Symbol Equity RTH + Overnight Gaps AAPL

VWAP Bands

by mihakralj
99 stars

This indicator plots a volume-weighted average price on the price chart and resets the calculation when the selected session changes. It builds first and second standard-deviation bands from a volume-weighted variance of the chosen source, which defaults to th

Indicator v6 VolumeVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of VWAP Bands

Tally Volume Index ROC

by pineforge-4pass
1 stars

A long-only strategy that measures the rate of change of the Negative Volume Index and Positive Volume Index over separate windows. It enters long when both growth rates first exceed their minimum thresholds and price is above a trend EMA. It exits when either

Strategy v6 VolumeTrend
Updated 6 days ago · Apache-2.0 GitHub repository of Tally Volume Index ROC
99 stars

This indicator calculates a volume-weighted average price from a chosen source and the chart volume, then plots upper and lower bands at a chosen number of standard deviations. Cumulative price-volume sums reset when the selected session interval changes, or o

Indicator v6 VolumeVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of VWAP with Standard Deviation Bands

TArec_p02_UNT

by pineforge-4pass
1 stars

The strategy tests untested TA classes including ALMA, SAR and rolling correlation under bar magnifier. It enters long only when ALMA crosses above close, SAR flips below price and 20-period correlation of close and volume is positive. It exits long when SAR f

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of TArec_p02_UNT
99 stars

This indicator denoises a selected price source with an a trous, or stationary, Haar wavelet. It decomposes the series into an approximation and detail coefficients across one to eight levels, estimates noise from the mean absolute level-one details, and soft-

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Wavelet Denoising Filter (WAVELET)
1 stars

A test strategy from a reference corpus that checks a daily counter reset using the trading day time variable. The counter resets at each new session. When it is even and flat, the strategy buys one unit and adds one to the counter; when it is odd and long, it

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of Time Tradingday Daily Reset Counter
99 stars

This indicator calculates and plots the Weighted Close Price (WCLPRICE), a standard price transform compatible with TA-Lib and equivalent to HLCC4. It computes the value by summing the high, the low, and twice the close price, then dividing the total by four t

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of WCLPRICE: Weighted Close Price

Torque TSI Signal

by pineforge-4pass
1 stars

A long-only strategy built on the True Strength Index smoothed by an RMA signal line, shown in a separate pane with a minimum strength line. It enters long when the index crosses above its signal, exceeds a minimum strength and price is above a trend EMA. It e

Strategy v6 Oscillators & momentumTrend
Updated 6 days ago · Apache-2.0 GitHub repository of Torque TSI Signal
99 stars

This indicator calculates the Cumulative Distribution Function (CDF) of the Weibull distribution based on min-max normalized price source data over a chosen lookback period. It transforms the normalized price value using adjustable shape (k) and scale (λ) para

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Weibull Distribution CDF

TSI Signal Cross

by pineforge-4pass
1 stars

A minimal strategy that compares the True Strength Index, with fixed 25 and 13 lengths, to a 13-period EMA of itself. It enters long when the index crosses above the average and short when it crosses below, reversing the position each time. It has no adjustabl

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of TSI Signal Cross
1 stars

This Pine Script strategy executes a dual moving average crossover system designed as a validation test for intraday order capping across exchange session rollovers. It calculates a 9-period fast SMA and a 21-period slow SMA, entering long on bullish crossover

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of US-equity Intraday Cap (Scaffold)
99 stars

Calculates the Weighted Root Mean Squared Error (WRMSE) between an actual data series and a predicted series over a user-defined lookback window. It plots the resulting error metric in a separate pane along with a baseline at zero representing zero error. User

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Weighted Root Mean Squared Error

VCP probe 01 - pivot strength 5

by pineforge-4pass
1 stars

This strategy identifies pivot highs and pivot lows using standard pivot detection functions to evaluate market structure. Plotted directly overlaying the price chart, it enters a fixed long position on the exact bar where a pivot low is confirmed. The long po

Strategy v6 Support & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of VCP probe 01 - pivot strength 5

Wiener Filter (WIENER)

by mihakralj
99 stars

This indicator plots a Wiener filter of a chosen price source on the price chart. It estimates noise from squared differences over a lookback window, estimates signal power from a smoothed mean of squared deviations, and blends the source toward that mean with

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Wiener Filter (WIENER)

VCP probe 02 fvg zones

by pineforge-4pass
1 stars

This strategy detects Fair Value Gaps on the price chart using 3-bar candle imbalances filtered by ATR. It maintains a capped array of active FVG zones with their tops, bottoms, and bullish flags. Long entries occur when the current bar overlaps an active bull

Strategy v6 SMC / ICT / price actionCandlestick patterns
Updated 6 days ago · Apache-2.0 GitHub repository of VCP probe 02 fvg zones

Williams %R (WILLR)

by mihakralj
99 stars

This indicator calculates Williams %R and plots the result in a separate pane. It stores highs and lows over a lookback period, finds the highest high and lowest low, and expresses the close as a percentage of that range on a scale from -100 to 0. When the ran

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Williams %R (WILLR)
1 stars

The strategy detects smoothed RSI divergences on the price chart. It calculates smoothed RSI as the EMA of 3 applied to the 14-period RSI of close. Bullish divergence signals when smoothed RSI is below 40, with smoothed RSI rising over five bars while close ex

Strategy v6 Oscillators & momentumDivergence
Updated 6 days ago · Apache-2.0 GitHub repository of VCP probe 03 - rsi smooth divergence

Williams Alligator

by mihakralj
99 stars

Calculates and plots the classic Williams Alligator indicator using smoothed moving averages (SMMA / Wilder's RMA) with exponential warmup compensation. It computes three distinct smoothed lines: the Jaw, Teeth, and Lips, which are plotted directly on the main

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Williams Alligator
1 stars

A small test strategy from a parity-checking corpus that isolates a volume Z-score calculation. It compares volume with its moving average and standard deviation, and flags bars where the absolute score is above 2. It enters one long unit on a flagged up bar a

Strategy v6 Volume
Updated 6 days ago · Apache-2.0 GitHub repository of VCP Probe 04 Volume Z-Score Anomaly

Williams Fractals

by mihakralj
99 stars

Williams Fractals detects classic five-bar reversal patterns directly on the price chart. The indicator calculates up fractals when a candle high exceeds the two preceding and two succeeding highs, and down fractals when a low is lower than the surrounding low

Indicator v6 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of Williams Fractals
1 stars

This strategy calculates synthetic buy and sell volume from candlestick price action and computes a ten-bar rolling cumulative volume delta. It signals long entries with a fixed position size of one unit when the cumulative delta crosses above zero, and closes

Strategy v6 VolumeOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of VCP probe 05 - cumulative vol delta
99 stars

This indicator plots the Williams Gator Oscillator in a separate pane. It builds three smoothed moving averages (jaw, teeth, and lips) from a chosen source, shifts each by its offset, and plots two histograms: the absolute gap between jaw and teeth above zero,

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Williams Gator Oscillator (GATOR)

VCP probe 06 - adx regime

by pineforge-4pass
1 stars

This strategy isolates and tests manual directional movement and ADX calculations plotted directly on the main price chart. It constructs plusDI, minusDI, and ADX without using built-in indicators, entering a long position when ADX exceeds 25 in an uptrend and

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of VCP probe 06 - adx regime

VCP Probe 07 - Session NY

by pineforge-4pass
1 stars

This Pine Script strategy isolates and validates session and timezone filtering using a basic market entry mechanism. It calculates active trading windows using timezone-aware time functions and enters a single long position at the start of the defined session

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of VCP Probe 07 - Session NY

VCP Probe 08 - Integration

by pineforge-4pass
1 stars

This integration strategy combines seven analytical layers into a single system drawn directly on the main price chart. It calculates pivot highs and lows, Fair Value Gaps (FVG) scaled by ATR, smoothed RSI momentum, volume z-score anomalies, cumulative volume

Strategy v6 TrendVolume
Updated 6 days ago · Apache-2.0 GitHub repository of VCP Probe 08 - Integration

Volume Breakout

by pineforge-4pass
1 stars

The Volume Breakout strategy identifies directional price movements confirmed by trading volume spikes and Average True Range thresholds. It enters long positions when prices rise beyond a volatility-adjusted distance accompanied by above-average volume, and s

Strategy v6 VolumeVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of Volume Breakout

VWMA vs SMA Divergence

by pineforge-4pass
1 stars

This strategy tracks the difference between a Volume-Weighted Moving Average (VWMA) and a Simple Moving Average (SMA) of identical lengths. It enters a long position when the VWMA crosses above the SMA, and enters a short position when the VWMA crosses below t

Strategy v6 Moving averagesVolume
Updated 6 days ago · Apache-2.0 GitHub repository of VWMA vs SMA Divergence

Zenith RCI WPR

by pineforge-4pass
1 stars

This strategy combines the Rank Correlation Index (RCI) and Williams %R to identify momentum confirmation for long positions. It enters a trade when RCI crosses above a specified entry threshold while Williams %R remains above its configured level. Exits occur

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of Zenith RCI WPR

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