Pine Script v6 is the current version of the language. A script declares its version on its first line, //@version=6, and TradingView compiles it with that version's rules.
Newer is not the same as better: a v6 script can still repaint or overfit. But v6 scripts are the easiest to read and extend, because they use the current names for every built-in function.
510 of these 4,367 scripts are marked Repaints, or read higher-timeframe data with lookahead on.
Before You Use One
Confirm the first line reads //@version=6.
Read the Risk Notes before trusting the signals.
Check the licence before reusing or editing the code.
Pine Script v6: Indicators, Strategies and Libraries
This indicator plots an ATR-based Chandelier Exit trailing stop on the price chart. It tracks a long stop under recent highs and a short stop above recent lows, then switches direction when price crosses the opposite stop. Buy and sell labels mark those flips.
The indicator plots ICT displacement candles on the price chart and can switch to retracement scanning. Displacement requires a move larger than a set share of the 14-bar average high-low range, lasting at least a chosen number of bars, with optional close, pr
This strategy calculates and plots a fast Exponential Moving Average (EMA) and a slow EMA directly on the main price chart. It enters long trades when the fast EMA crosses above the slow EMA and exits when the fast EMA crosses below the slow EMA. Inputs allow
Calculates the standard deviation of VIX high prices across a configurable lookback period. It plots the resulting volatility metric in a separate pane alongside upper and lower threshold horizontal levels. When the standard deviation falls below the lower thr
This indicator plots three exponential moving averages and ATR volatility envelopes on the price chart. It compares the fast and slow EMAs to shade a trend ribbon and marks confirmed upward and downward crossovers with triangle labels. Settings change the thre
This indicator plots auto trade signals for E-mini S&P 500 futures on the price chart. It computes an EMA200 filter along with day ETH RTH session levels and percentage-based entry zones. Signals trigger CALL or PUT cases when price crosses defined thresholds
Confluence of Alerts is an overlay indicator that combines up to three user-defined conditions on the price chart. Each condition watches a price source for crossing, crossing up or down, greater than, less than, rising, or falling events against a numeric val
This strategy calculates the Moving Average Convergence Divergence indicator and plots the MACD line, signal line, and histogram in a separate pane. It enters long positions when the MACD line crosses above the signal line and enters short positions when it cr
This indicator implements the Fractal Model concept to plot market structure shifts, liquidity sweeps, and Change in State of Delivery (CISD) levels. It overlays custom higher-timeframe candle previews, open prices, and time markers directly on the price chart
This indicator calculates pivot highs and pivot lows to detect liquidity sweeps and Swing Failure Patterns. It identifies when price breaks past recent key swing highs or lows within a configurable historical window, then looks for a quick reversal or change i
KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev
The Unicorn Model indicator identifies liquidity sweeps across multiple higher timeframes and highlights breaker blocks on the price chart. When Unicorn Mode is enabled, it filters setups where breaker blocks overlap with Fair Value Gaps. It draws breaker boxe
The 8zz Contrarian Indicator plots reverse sentiment trading signals directly on the price chart based on tracked retail post activity. It generates bullish signals during retail panic and bearish signals during market euphoria. The indicator features adjustab
Gold Scalping BOS & CHoCH is an overlay strategy designed for detecting market structure shifts. It calculates rolling swing highs and lows to identify Break of Structure (BOS) and Change of Character (CHoCH) events. Long signals trigger when bullish BOS and C
The Aberration indicator calculates channel bands based on the absolute deviation of a price source from a central moving average. Traders can choose between SMA, EMA, WMA, RMA, or HMA for the baseline, then apply a multiplier to the smoothed deviation to form
This indicator plots horizontal liquidation heatlines directly on the price chart, highlighting estimated Bitcoin liquidation levels for long and short positions. It renders color-coded lines and descriptive labels showing position sizes, leverage, and distanc
This strategy builds a spot grid between user-set high and low prices and draws it on the price chart. It splits that range into ten levels and places up to five long limit orders at the lower levels, sizing each from current equity. Orders already below price
An overlay indicator that applies a k-nearest-neighbors machine learning classifier using Lorentzian distance to predict price movement. It evaluates historical market features, such as RSI, WaveTrend, CCI, and ADX, to identify similar price-time patterns and
Minimal Fill Examples is an educational reference script demonstrating five basic implementations of the fill function in Pine Script. It calculates simple moving averages and plots price lines alongside horizontal reference levels. The script showcases variou
Momentum Rider Alerts is an indicator overlay designed to generate momentum signals on the price chart. It visualizes price momentum dynamics and triggers real-time alerts when momentum conditions are met. Users can apply this tool across various markets to id
This strategy plots a MACD oscillator in a separate pane and trades Bitcoin futures from zero-line and signal-line crosses. Optional early momentum signals, a volume filter, and a trend moving-average filter can confirm entries. It sizes positions as fixed con
Calculates higher-timeframe volume profiles to identify Value Area High (VAH), Value Area Low (VAL), and Point of Control (POC) levels directly on the price chart. It flags potential reversal setups and Change in State of Delivery (CISD) patterns relative to v
The 8-Factor Composite Screener evaluates equities across fundamental and technical criteria, including valuation ratios, earnings and revenue growth, 12-month return momentum, proximity to 52-week highs, Stage 2 moving average alignment, benchmark relative st
This Pine Script indicator overlays institutional liquidity levels on the price chart. It identifies order block levels using pivot highs and lows, then draws mean reversion lines from the 20 and 50 period simple moving averages, a volatility range midpoint pr
Apex Trend & Liquidity Master calculates a trend cloud using customizable moving averages expanded by a volatility multiplier directly on the main price chart. It identifies dynamic support and resistance liquidity zones from swing high and low pivots, extendi
SSE Index RSI Bounce Strategy is a multi-timeframe momentum and trend strategy that combines daily and weekly Relative Strength Index (RSI) bounds with Exponential Moving Averages (EMA). It identifies long entries when daily or weekly RSI crosses up from overs
This indicator plots Aberration bands on the price chart around a central moving average. It measures the absolute deviation of the source from that average, smooths the deviation with a simple moving average, and offsets the center by a multiplier to form upp
Gold Scalping BOS & CHoCH with MA Filter is a strategy that identifies market structure shifts using Break of Structure (BOS) and Change of Character (CHoCH) signals alongside exponential moving average trend filters. Long trades enter when bullish BOS, bullis
4H Candle Curves highlights 4-hour trading sessions based on New York time by overlaying customizable colored boxes directly on the main price chart. It divides 4-hour sessions with quarter separator lines at one-hour intervals and places name labels at the mi
Peak Reversal v3 identifies potential mean-reversion points by plotting configurable Keltner Channels alongside a squeeze detector directly on the price chart. It detects momentum extremes when candles cross or trade completely outside the inner or outer chann
This indicator plots Donald Bradley's siderograph as a weighted sum of planetary longitude aspects and declination parallels and contraparallels. It draws the sidereal potential, optional long-term and mid-term curves, and a Mars-Venus declination factor on th
This indicator transforms standard RSI calculations into logit space, estimating rolling distributions to derive empirical z-scores mapped back to the 0–100 RSI scale. Plotted in a separate pane, it features multi-horizon central lines—fast and structural cent
This intraday strategy implements Mark Fisher's Opening Range Breakout (ORB) methodology tailored for index futures like ES and NQ. It calculates session opening ranges, volume z-scores, and VWAP bands to plot support, resistance, and confirmation levels on th
This macro indicator analyzes international and domestic transmission channels affecting Vietnamese government bond yields. Plotted in a separate pane with diagnostic tables and background shading, it tracks six macro pathways including Japanese yields, Yen ca
Extension Functionality Test is a Pine Script v6 script designed to evaluate editor extension capabilities such as syntax highlighting, code completions, hover documentation, and static analysis. The code demonstrates various Pine v6 features, including dynami
Ghost Channels fits dynamic parallel trend channels over a configurable lookback window using linear regression or pivot swing methods. It layers confirmation signals onto the channel geometry, detecting candlestick pattern reactions at the rails, volume-confi
This overlay indicator measures average bar range as a simple moving average of high minus low, then draws short horizontal ticks at one to four times that range above and below the close. The user chooses which multipliers appear, their colors, and the line w
This indicator calculates a dynamic trend-following line on the price chart by combining custom Supertrend calculations with exponential rate scaling. It identifies trend direction based on price crossovers against ATR-based distance bands. As a trend persists
This indicator is a short Pine Script v6 test fixture for function signature checks. It calculates a 14-period simple moving average of the close and calls alert with a fixed message. The remaining lines deliberately misuse functions, including an extra argume
Auto Fib Extension automatically identifies high and low pivot points on the price chart to construct Fibonacci extension levels. The script calculates pivot points based on a user-defined depth setting and tracks significant swing points using dynamic chart p
Debug Test is a minimal example script written in Pine Script v6 designed for editor testing and extension validation. It demonstrates basic input parameter definitions, configuring a boolean toggle and a color selection setting without executing complex calcu
This Pine Script strategy identifies classic bullish engulfing candlestick patterns to open long positions, deploying 100 percent of equity. It calculates a short-term Relative Strength Index to determine exits, closing open long positions when the RSI exceeds
This indicator draws a periodic volume profile on the price chart and marks the point of control plus optional value-area high and low. It distributes each bar's volume across profile rows using a selected periodic timeframe, row count, value-area percentage,
Complete is a short Pine Script v6 indicator used as an editor completion fixture. It declares a user-defined Point type with float fields, constructs one instance, and reads its x coordinate. It also calculates a five-bar simple moving average of the close an
This script serves as a syntax demonstration and test suite for Pine Script v6 type declarations, created primarily for testing editor syntax highlighters and themes. It defines user-defined types, exported enums, and demonstrates various variable forms across
This indicator draws a visual present-state context panel on the price chart. It classifies volatility from ATR and Bollinger bandwidth percentiles, measures how far price sits from an EMA in ATR units, and scores trailing candle noise with wick ratio, directi
Bandz HTF projects higher-timeframe candle structures, ranges, and key levels directly onto the main price chart. It visualizes multiple configurable timeframe lanes from intraday to weekly alongside primary and macro range levels, including 25%, 50%, and 75%
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.