Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 64)

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

Calculates and plots a three-tiered moving average framework consisting of Fast, Base, and Anchor curves directly on the price chart. It evaluates moving average slopes, curvature, separation, and price extension to categorize market conditions into states suc

Indicator v6 Moving averagesTrend
Updated 3 days ago · MIT GitHub repository of MA Cascade Engine [WavesUnchained]

Assistant

by eddiebelaval
7 stars

Assistant is an overlay indicator that marks candles with small or missing upper and lower wicks, using a threshold relative to body size. It plots three-candle and five-candle swing fractals as triangles two bars back, and fires alerts when a bullish or beari

Indicator v6 Candlestick patternsSupport & resistance
Updated 3 months ago · None stated GitHub repository of Assistant
4 stars

This intraday strategy executes trades on the Nikkei 225 index based on exponential moving average crossovers restricted to Tokyo Stock Exchange trading hours (09:00 to 15:30 JST). Long and short positions are taken on fast and slow EMA crossovers during activ

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Nikkei Japan Strategy [trugurpala]

Rolling VWAP

by regalouisei
2 stars

The Rolling VWAP indicator calculates and overlays a rolling volume-weighted average price directly on the price chart. Unlike anchored or daily reset VWAPs, it calculates volume-weighted price over a continuous rolling time window defined by days, hours, and

Indicator v6 Moving averagesVolume
Updated 8 months ago · None stated GitHub repository of Rolling VWAP

HMA sweete

by mushroom-men-Trading
2 stars

The HMA sweete indicator computes multiple variants of the Hull Moving Average including standard HMA THMA EHMA and custom z- versions with added momentum. Users can select the source series MA type length multiplier and history bars for up to three MAs. It pl

Indicator v6 Moving averages
Updated 9 months ago · None stated GitHub repository of HMA sweete

This strategy implements the classic Turtle Trading breakout rules on the price chart. It enters positions when price breaks above or below highest high or lowest low channel levels. Position size is dynamically calculated using ATR volatility so that one ATR

Strategy v6 BreakoutTrend
Updated 4 days ago · MPL-2.0 GitHub repository of Turtle Breakout (Dennis & Eckhardt) [JR]
1 stars

This long-only strategy identifies trading opportunities using anchored VWAP reclaims, retests, and breakouts. It calculates VWAP with standard deviation bands alongside zero-lag EMA slope filters to verify market trend alignment. Entries trigger either from a

Strategy v6 TrendMoving averages Repaints
Updated 4 days ago · None stated GitHub repository of VWAP Reclaim (LONG-only)

MA Stack Array

by pineforge-4pass
1 stars

This strategy calculates three simple moving averages with lengths 10, 20 and 50. It identifies a bull stack when the shortest exceeds the middle which exceeds the longest, and a bear stack in the opposite direction. A var-bool latch tracks prior states to sup

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of MA Stack Array

P_err_unclosed_paren

by GammaExpansion
1 stars

This script is an indicator written in Pine Script version 6. It declares an indicator named P_err_unclosed_paren and plots the close price using the plot function. The plot draws in a separate pane. There are no input settings. The script is incomplete with a

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_err_unclosed_paren
1 stars

An overlay indicator for the New York morning window that looks for qualified structure breaks on a 5-minute chart. Direction is filtered by a one-hour bias built from swing structure and EMAs. A break must clear swing, channel or session-extreme levels and pa

Indicator v6 BreakoutSessions & time Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Morning Structure + Flow Research

DEPV2 DEBUG S17

by YuceSezar89
1 stars

DEPV2 DEBUG S17 is a debug indicator for a multi-method crypto trading signal tool. It supports 20 major cryptocurrency symbols from Binance such as BTCUSDT, ETHUSDT, SOLUSDT, and others. Four signal classes are available: TREND based on price levels, MOMENTUM

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

6/20 Cloud Flip

by vedkanani123
1 stars

A small price-chart indicator that plots a fast and a slow exponential moving average, defaulting to 6 and 20 periods, and fills the space between them with a cloud. The cloud is green while the fast average is above the slow one and red otherwise, so a colour

Indicator v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of 6/20 Cloud Flip

Method Example

by ivansoft
1 stars

Teaching script showing user-defined methods in Pine. A method keeps an array of the latest 50 closes by adding a new value and removing the oldest, and the script plots the array's average in a separate pane, which acts as a 50-bar simple average. It also not

Indicator v6
Updated 1 year ago · None stated GitHub repository of Method Example
228 stars

This indicator computes moving average and RSI bias signals across the current timeframe and four higher timeframes. It sums biases from the MA and RSI to derive an overall bullish or bearish signal. The results appear in a configurable table that displays eac

Indicator v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe Analysis Template
99 stars

The Chande Forecast Oscillator plots the percentage difference between the selected source and a linear-regression forecast of that source. It fits slope and intercept over the chosen period using incremental sums, then expresses the forecast error as a percen

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Chande Forecast Oscillator (CFO)

This indicator calculates a Gaussian-weighted moving average of a chosen price source and plots it on the price chart. It builds a finite impulse response window, weights past bars with a normalized Gaussian bell, and returns the weighted mean. Period sets the

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Gaussian-Weighted Moving Average (GWMA)
16 stars

This strategy plots on the price chart and trades Donchian breakouts in long or short directions. It sizes each unit from a risk percentage of price and an ATR-based initial stop, then adds units at a fixed ATR step up to a maximum. An ATR trail can exit, and

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 39: Adaptive Targets

This indicator classifies market state into bull, bear, or neutral regimes using three moving averages and ATR-based stop bands plotted directly on the price chart. It evaluates alignment across customizable MA types (SMA, EMA, DEMA, TEMA, or JMA) and filters

Indicator v6 TrendMoving averages
Updated 3 days ago · MIT GitHub repository of MA Regime Bands [WavesUnchained]

Average True Range V2

by eddiebelaval
7 stars

Average True Range V2 calculates market volatility using customizable moving average smoothing methods, including RMA, SMA, EMA, and WMA. Drawn in a separate pane, it offers options to wait for bar confirmation before updating values and can invert the ATR sca

Indicator v6 Volatility & bands
Updated 3 months ago · None stated GitHub repository of Average True Range V2
4 stars

This strategy calculates fast and slow exponential moving averages, the Relative Strength Index, and the Average True Range directly on the price chart. It enters long positions when the fast EMA crosses above the slow EMA with RSI above the minimum threshold

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of NQ Nasdaq Strategy [trugurpala]

HMACCI

by mushroom-men-Trading
2 stars

The HMACCI indicator calculates multiple Hull Moving Averages with variants including Hma, Thma, Ehma and Rmahma. It plots colored line signals on the price chart based on source close, lengths, multipliers, offsets and history bars. Users adjust MA types, len

Indicator v6 Moving averages
Updated 9 months ago · None stated GitHub repository of HMACCI

The Volatility Breakout (Larry Williams) strategy generates signals based on price movements relative to yesterday's range. Long entries occur when price surpasses the close by a user-defined multiple of the range, while short entries use a lower multiple. A t

Strategy v6 BreakoutVolatility & bands
Updated 4 days ago · MPL-2.0 GitHub repository of Volatility Breakout (Larry Williams) [JR]
1 stars

This indicator detects long-only trading setups centered on volume-weighted average price (VWAP) reclaim sequences. It calculates VWAP with standard deviation bands, tracking slope and price bias through an exponential moving average. Signals trigger on either

Indicator v6 TrendMoving averages
Updated 4 days ago · None stated GitHub repository of VWAP Reclaim (LONG-only) Indicator

MACD Histogram Reversal

by pineforge-4pass
1 stars

A strategy based on MACD with adjustable fast, slow and signal lengths and a selectable source. Despite its name, entries come from the MACD line crossing the signal line: long on a cross up, short on a cross down, reversing the position. The histogram, MACD l

Strategy v6 Oscillators & momentum
Updated 7 days ago · Apache-2.0 GitHub repository of MACD Histogram Reversal

P_err_undeclared_identifier

by GammaExpansion
1 stars

This test indicator is designed to verify parser error handling for undeclared identifiers in Pine Script v6. It attempts to plot an uninitialized variable name on a separate chart pane, serving as a syntax validation fixture for Pine Script backtesting engine

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

MTF Second-Flip Continuation

by rosijay17-cmd
1 stars

A strategy that trades continuation after a second directional flip, intended for a 15-minute chart. Bias must agree between confirmed one-hour and four-hour structure. Lower-timeframe states are rebuilt relative to the bar open, the setup is frozen once the s

Strategy v6 TrendSessions & time
Updated 8 days ago · GPL-3.0 GitHub repository of MTF Second-Flip Continuation

DEPV2 DEBUG S18

by YuceSezar89
1 stars

This Pine Script indicator scans multiple Binance cryptocurrency symbols including BTCUSDT, ETHUSDT, and others. It computes signals across four method classes: trend, momentum, volatility, and volume. Different signal modes include single-method, simultaneous

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

A momentum consensus indicator drawn on the price chart. It scores RSI, rate of change, MACD, Bollinger position, MFI and smoothed OBV against a percentile lookback and issues buy and sell signals when the consensus passes a threshold, 0.618 by default. Option

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of Adaptive Momentum Classifier
1 stars

A dollar-cost-averaging grid strategy. It opens a base order sized as a percent of equity and adds up to a set number of safety orders at widening price deviations, each scaled larger. A second mode uses Bollinger Band width from a higher timeframe, 4 hours by

Strategy v6 Volatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of TN DCA Webhook Engine

Moving Average Simple

by ivansoft
1 stars

Plots a simple moving average on the price chart with adjustable length, source and offset. An optional second smoothing line can be added to the result using SMA, EMA, SMMA, WMA or VWMA, or SMA with Bollinger Bands whose width follows a multiplier. The defaul

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

This indicator calculates the Relative Strength Index (RSI) across four user-selected timeframes and plots the results in a separate pane. It identifies regular bullish and bearish divergences between price pivot points and the primary timeframe RSI value. Add

Indicator v6 Oscillators & momentumDivergence
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe RSI with Divergence
99 stars

The Chande Kroll Stop calculates volatility-based adaptive trailing stops for long and short positions. It determines an initial volatility envelope by subtracting or adding a scaled Average True Range from the highest high or lowest low over a set lookback pe

Indicator v6 TrendVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Chande Kroll Stop (CKSTOP)
47 stars

This indicator plots a Hamming-window finite impulse response moving average of a chosen price source on the price chart. It weights recent bars with the Hamming cosine window, renormalizes by the sum of weights, and uses only bars available during warm-up so

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Hamming Moving Average (HAMMA)
16 stars

This strategy trades Donchian breakouts on the price chart and tries to avoid choppy conditions. It can enter long or short when price breaks the entry channel and optional ADX, efficiency-ratio, and trend-strength filters pass. It exits on the shorter Donchia

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

Market Exhaustion combines the Money Flow Index (MFI) and Stochastic RSI to pinpoint overbought and oversold conditions. It offers customizable oscillator modes including MFI, Commodity Channel Index (CCI), or a composite blend. The indicator calculates standa

Indicator v6 Oscillators & momentumDivergence
Updated 3 days ago · MIT GitHub repository of Market Exhaustion [WavesUnchained]

This indicator treats price action, RSI, or moving average relationships as binary Bernoulli trials to estimate trend probability and Shannon entropy over a rolling sample window. It calculates the proportion of bullish outcomes and measures market uncertainty

Indicator v6 Oscillators & momentumTrend
4 stars

This strategy draws on the price chart and identifies mean-reversion opportunities around daily volume-weighted average price (VWAP) bands. It enters long positions when the price crosses above the lower band while the Relative Strength Index indicates oversol

Strategy v6 Mean reversionSessions & time
Updated 2 months ago · MIT GitHub repository of NQ VWAP Reversion [trugurpala]

Adaptive Market Profile

by regalouisei
2 stars

This indicator plots an adaptive trend channel and market profile directly on the price chart. It calculates linear regression channels either automatically or using a fixed bar period, with support for logarithmic scaling. The script divides the channel into

Indicator v6 TrendVolume
Updated 8 months ago · None stated GitHub repository of Adaptive Market Profile

Holt-Winters Moving Average (HWMA)

by mushroom-men-Trading
2 stars

The Holt-Winters Moving Average (HWMA) indicator applies a triple exponential smoothing algorithm to track price trends by filtering noise while maintaining responsiveness. It computes level, velocity, and acceleration components from a chosen price source ove

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Holt-Winters Moving Average (HWMA)

Volatility Regime Lab

by jayadevrana
1 stars

Volatility Regime Lab ranks the current ATR against its own recent history and labels the market Quiet, Normal, or Wild. It shades the price-chart background by that regime. On the last bar it shows a table of how often each regime occurred, the average N-bar

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 4 days ago · MPL-2.0 GitHub repository of Volatility Regime Lab

VWAP Reclaim Indicator

by skipp-dev
1 stars

This overlay indicator plots an anchored VWAP and marks reclaim setups on the price chart. It can signal a simple VWAP cross or a reclaim, retest, and breakout of a rolling pullback high or low, filtered by trade direction and optional matching VWAP slope. A p

Indicator v6 TrendVolume Repaints
Updated 4 days ago · None stated GitHub repository of VWAP Reclaim Indicator

MACD Signal Cross

by pineforge-4pass
1 stars

A minimal strategy using MACD with fixed 12, 26 and 9 settings. It enters long when the MACD line crosses above the signal line and short when it crosses below, reversing the position each time. It has no inputs, no stop loss and no take profit. The script is

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

P_err_undefined_namespace_function is a Pine Script v6 syntax test fixture created for compiler and parser validation. The script attempts to call and plot an undefined function within the built-in technical analysis namespace. It is designed to verify proper

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

NQ Phantom Scalper Pro

by rosijay17-cmd
1 stars

A strategy that trades around an anchored VWAP with standard-deviation bands. The VWAP can reset each session, week, month, quarter or year, with two adjustable band multipliers. A volume spike filter, a time-of-day filter with an optional lunch-hour exclusion

Strategy v6 Mean reversionVolume
Updated 8 days ago · GPL-3.0 GitHub repository of NQ Phantom Scalper Pro

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