Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 79)

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

A test strategy from a reference corpus that studies start-up behaviour of a daily 26-period EMA requested from a lower-timeframe chart without lookahead. It goes long while the daily EMA is rising and short while it is falling, closing the opposite position f

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF Probe 09 Daily EMA Warmup

S_pyramiding_any

by GammaExpansion
1 stars

This strategy acts as a test fixture designed to evaluate Pine Script execution logic around pyramiding limits, position sizing, and order management under the ANY entry closure rule. It uses bar index cycles to execute scheduled entry orders, order reductions

Strategy v6
Updated 7 days ago · MIT GitHub repository of S_pyramiding_any
1 stars

This strategy filters fakeout signals using a 4-layer causal scoring system to ensure high-conviction entries on the price chart. It computes a sovereign score based on volume exceeding a moving average multiplier, alignment with higher-timeframe EMA, minimum

Strategy v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of TN Sovereign Fakeout Filter

This indicator estimates the dominant cycle period of a price series using John Ehlers' homodyne discriminator. It smooths the source, builds in-phase and quadrature components, and converts the phase angle into a cycle length. The result is rate-limited by ab

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Homodyne Discriminator (HOMOD)
47 stars

Calculates the detrended synthetic price using dual Super Smoother Filters (SSF) derived from a user-defined dominant cycle period. The indicator computes a fast SSF based on a quarter-cycle period and a slow SSF based on a half-cycle period, then plots the di

Indicator v6 Oscillators & momentumMoving averages
Updated 8 months ago · MIT GitHub repository of SSF-Based Detrended Synthetic Price
9 stars

This indicator quantifies the risk of a prevailing market structure break by combining trend context, structure, and momentum into a composite 0–100 risk score. It plots an RSI oscillator with momentum divergence lines in a separate pane while projecting key b

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 days ago · MIT GitHub repository of Structure Break Risk

Trend Line Methods

by eddiebelaval
7 stars

Trend Line Methods draws optional trend geometry on the price chart. The pivot span method stores recent pivot highs and lows using left and right confirmation bars, a pivot count, and a lookback length, then plots a high trend line and a low trend line with a

Indicator v6 TrendSupport & resistance
Updated 3 months ago · None stated GitHub repository of Trend Line Methods

Volume Rate of Change (VROC)

by mushroom-men-Trading
2 stars

This indicator measures the speed at which volume changes over a specified number of periods. It calculates either the simple point difference or the percentage change between current volume and historical volume from a set lookback period. The resulting line

Indicator v6 VolumeOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Volume Rate of Change (VROC)
1 stars

This strategy computes a session-gated RSI value using a deep history reference of 500 bars on a source that is NA outside the session window. It signals long entries on RSI crossover above 30 with valid session and closes positions on crossover below 70. The

Strategy v6 Oscillators & momentumSessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF na-chain probe 01 - deep history int na

S_pyramiding_fifo

by GammaExpansion
1 stars

This strategy fixture cycles every forty bars and places timed long and short entries, closes, and raw orders to exercise TradingView pyramiding and FIFO fill rules. It opens up to three long entries, ignores a fourth, closes by identifier, reduces size with a

Strategy v6
Updated 7 days ago · MIT GitHub repository of S_pyramiding_fifo
1 stars

This overlay strategy builds long and short signals from a fast EMA crossing a slow EMA. Optional filters require elevated volume versus a volume average, a set number of confirmation bars, alignment with a higher-timeframe EMA, and a minimum bar move versus A

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Fakeout Filter v6

Ehlers Laguerre Filter

by mihakralj
99 stars

The Ehlers Laguerre Filter is a smoothing indicator designed by John F. Ehlers that utilizes a four-element cascaded infinite impulse response filter. It applies time-warped Laguerre polynomials to the chosen price source to achieve low-lag trend filtering. Tr

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Laguerre Filter
47 stars

Calculates the rolling Z-score of an input price series over a specified lookback window. It uses a sliding window array to maintain rolling sums and calculate the sample mean and sample standard deviation incrementally, accounting for missing values. The resu

Indicator v6 Mean reversionOscillators & momentum
Updated 8 months ago · MIT GitHub repository of Standardization (Z-score)

This indicator identifies support and resistance levels on the price chart using an integrated detector engine. It combines pivot clusters, multiple price tests, supply and demand bases, order blocks, fair value gaps, and equal high or low liquidity. Detected

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 3 days ago · MIT GitHub repository of Support & Resistance Zones [WavesUnchained]

Tuoppi Entries

by eddiebelaval
7 stars

This overlay indicator calculates a WaveTrend oscillator from the typical price using two exponential averages and a short simple average. It marks a long when the fast and slow lines cross bullishly below the oversold level, and a short when they cross bearis

Indicator v6 Oscillators & momentum Repaints
Updated 3 months ago · None stated GitHub repository of Tuoppi Entries
1 stars

This strategy detects RSI momentum crossovers to enter long positions with fixed size. When holding a position it places a bracket exit using ATR-based stop and limit levels. The OCA name ensures any filled side cancels the other. The script verifies that stra

Strategy v6 Oscillators & momentumVolatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of PF OCA probe 01 - exit bracket cancel

S_risk

by GammaExpansion
1 stars

S_risk is a test strategy designed to demonstrate and verify Pine Script strategy risk management functions. It applies built-in risk rules to restrict order direction to long-only (converting short orders into position closures), caps maximum position sizes,

Strategy v6
Updated 7 days ago · MIT GitHub repository of S_risk
1 stars

This price-chart strategy enters long when a fast EMA crosses above a slow EMA and short when it crosses below, provided optional filters pass. Volume must exceed a multiple of its average, price must sit on the matching side of a higher-timeframe EMA, and the

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Fakeout v6

Calculates John Ehlers' Linear Predictive Filter based on the Griffiths Least Mean Squares adaptive predictor algorithm. It processes the source price through a roofing filter combining a highpass filter and SuperSmoother lowpass filter, followed by automatic

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Linear Predictive Filter (LPF)

The Stoller Average Range Channel (STARCHANNEL) plots volatility-based bands around a central baseline directly on the price chart. It calculates a middle line using a simple moving average of the selected price source and constructs upper and lower boundaries

Indicator v6 Volatility & bandsMoving averages
Updated 8 months ago · MIT GitHub repository of Stoller Average Range Channel (STARCHANNEL)

Swing Conviction Radar measures the strength of individual price swings by calculating a composite conviction score from 0 to 100 at confirmed pivots. It evaluates three swing components: ATR-normalized speed, trend cleanliness (fraction of on-trend bars), and

Indicator v6 Oscillators & momentumVolume
Updated 3 days ago · MIT GitHub repository of Swing Conviction Radar [WavesUnchained]

Volume Weighted Average Price (VWAP)

by mushroom-men-Trading
2 stars

This indicator calculates the Volume Weighted Average Price (VWAP) based on the provided source price series, typically hlc3, weighted by volume. The VWAP resets at the beginning of the specified session type, such as daily (1D), hourly (1H), or custom interva

Indicator v6 VolumeSupport & resistance
Updated 9 months ago · None stated GitHub repository of Volume Weighted Average Price (VWAP)
1 stars

A test strategy from a reference corpus that checks independent exit brackets. It goes long two units when a 9-period EMA crosses above a 21-period EMA and RSI is below 60. Two exit orders each handle one unit, one with a stop and target one ATR from the avera

Strategy v6 Volatility & bandsMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF OCA Probe 02 Multi-Bracket Isolation

S_risk_allow_entry_in

by GammaExpansion
1 stars

This Pine Script v6 strategy fixture tests a long-only entry restriction. It splits bars into cycles of 16, enters long at phase 0, tries short entries at phases 4 and 8, closes every position at phase 12, and cancels pending orders at phase 15. An opposing sh

Strategy v6
Updated 7 days ago · MIT GitHub repository of S_risk_allow_entry_in

NIFTY 5m Supertrend Scalper

by vedkanani123
1 stars

A price-chart indicator designed for the one-minute chart of Indian index instruments. It computes a Supertrend with ATR length 10 and multiplier 3 on confirmed five-minute bars, so a flip signal appears on the first one-minute bar after the five-minute close.

Indicator v6 TrendScalping
Updated 2 months ago · None stated GitHub repository of NIFTY 5m Supertrend Scalper
1 stars

A Fibonacci pullback strategy on the price chart. It finds the highest high and lowest low over a lookback, then draws long and short retracement levels at a chosen ratio from 0.236 to 0.786. A trade is only considered at one specific hour, in the direction of

Strategy v6 Support & resistanceTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign Fibonacci
99 stars

Calculates John F. Ehlers' MESA Stochastic oscillator by processing price data through a roofing filter before applying stochastic logic. The roofing filter combines a high-pass filter to remove low-frequency trend components and a super smoother filter to fil

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers MESA Stochastic (MSTOCH)
47 stars

This indicator calculates a two-pole IIR Butterworth-style supersmooth lowpass filter and plots the resulting smoothed curve directly on the price chart overlay. It filters out high-frequency noise from market data with minimal lag. The user can adjust the cal

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Supersmooth Filter (SSF)

This indicator evaluates market structure events, including breaks of structure, liquidity sweeps, and order blocks, by calculating reaction speed, validation, and volatility activity scores. It plots composite scores in a separate pane while offering optional

Indicator v6 Volatility & bandsSMC / ICT / price action
Updated 3 days ago · MIT GitHub repository of Time-to-React + Volatility-Time (BOS / Sweep / OB)

Visual Trading Zones

by eddiebelaval
7 stars

Visual Trading Zones draws evenly spaced price zones on the chart from the highest and lowest prices over a configurable lookback. It spaces levels by a step in ticks or forex pips, optionally inserts sublevels, and can show filled zones, level lines, and pric

Indicator v6 Support & resistance
Updated 3 months ago · None stated GitHub repository of Visual Trading Zones

PF poc exit-while-flat false

by pineforge-4pass
1 stars

PF poc exit-while-flat false is an overlay strategy designed to test Pine Script execution engine parity. It calculates 9-period and 21-period Exponential Moving Averages (EMA). When a bullish crossover occurs while flat, it places a limit buy order 2% below t

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF poc exit-while-flat false

S_risk_max_position_size

by GammaExpansion
1 stars

This strategy tests TradingView’s maximum position size risk limit in a separate pane. Every 20 bars it tries a long entry of 40 units, a second long entry, and a long order of 10, then closes all trades, repeats the same idea on the short side, and cancels re

Strategy v6
Updated 7 days ago · MIT GitHub repository of S_risk_max_position_size

NIMOV6 + THT Volume Pro

by vedkanani123
1 stars

A price-chart indicator that plots several EMAs with a coloured 8 and 21 cloud, Bollinger Bands, and an optional VWAP. Buy and sell triangles mark 8 and 21 EMA crossovers, and further intraday patterns use three higher lows or three lower highs. An optional vo

Indicator v6 Moving averagesVolume
Updated 2 months ago · None stated GitHub repository of NIMOV6 + THT Volume Pro
1 stars

This strategy pairs the Fisher Transform oscillator with a long-term exponential moving average trend filter to execute trend-aligned reversal entries. It enters long when the Fisher line crosses above its trigger line while price remains above the EMA, and en

Strategy v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Fisher v6

This indicator plots the Ehlers moving average difference with Hann windowing in a separate pane. It runs two Hann FIR filters on the chosen source: a short window and a longer window whose length is the short length plus half the dominant cycle. The oscillato

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Moving Average Difference with Hann (MADH)

Theil Index (THEIL)

by mihakralj
47 stars

The Theil Index indicator measures statistical inequality and distribution entropy in a price series over a specified lookback period. It iterates through recent bars, calculates the mean price, and computes the sum of logarithmic price-to-mean ratios. Higher

Indicator v6 Volatility & bands
Updated 8 months ago · MIT GitHub repository of Theil Index (THEIL)

Trade Permission Engine evaluates whether market structure currently permits long or short trades, alongside a decoupled Position Health score for managing existing positions. It analyzes alternating confirmed swing legs, Fibonacci retracement depths, time mat

Indicator v6 SMC / ICT / price actionTrend
Updated 3 days ago · MIT GitHub repository of Trade Permission Engine [WavesUnchained]

Volume Candle Coloring

by eddiebelaval
7 stars

This indicator colors price chart candles according to trading volume relative to a simple moving average. It classifies volume into five distinct tiers ranging from low to ultra using customizable multiplier thresholds. Candles are painted directly on the mai

Indicator v6 VolumeCandlestick patterns
Updated 3 months ago · None stated GitHub repository of Volume Candle Coloring

Weighted Moving Average (WMA)

by mushroom-men-Trading
2 stars

The Weighted Moving Average indicator computes a weighted average of price data using an optimized circular buffer for efficient calculation. It plots the WMA line on the price chart as an overlay. The period setting determines the lookback window, and the sou

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Weighted Moving Average (WMA)

PF poc exit-while-flat true

by pineforge-4pass
1 stars

This strategy is a validation probe designed to test order execution behavior when issuing bracket exit orders while flat alongside a pending limit entry. It calculates 9-period and 21-period exponential moving averages on price data. On a bullish EMA crossove

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF poc exit-while-flat true

Trend Breakout

by GammaExpansion
1 stars

Trend Breakout is a price-chart strategy that builds a simple moving average and upper and lower bands from a multiple of standard deviation. It enters long when close crosses above the upper band and short when close crosses below the lower band. Position siz

Strategy v6 TrendBreakout
Updated 7 days ago · MIT GitHub repository of Trend Breakout

NO.1 Major Daily Signal

by vedkanani123
1 stars

A price-chart indicator that marks only buy and sell labels, with no trail, cloud or dashboard. A signal closes any opposite position and flips direction. It combines a fast zero-lag EMA, slow EMA, Hull average and macro EMA with slope, separation, ADX, DMI sp

Indicator v6 TrendSessions & time Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 Major Daily Signal

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