A test strategy from a reference corpus that checks the count of trades with zero net result. At midnight it buys one unit, then places a limit exit at the entry price so that the trade closes flat once price returns to it. The trade counter is plotted but hid
P_syn_loops calculates a composite numeric sum using several Pine Script v6 loop structures and plots the final value in a separate pane. It demonstrates standard forward for-loops, reverse stepping for-loops over historical close prices, array for-in loops wi
A Donchian-style trend strategy that enters on a breakout of a 55-bar channel and exits on a 20-bar channel break, with a 200-period EMA as the regime filter. Entries can require a fresh breakout and an ADX and DMI strength check. An ATR trailing stop is drawn
DEPV2 DEBUG S46 is a Pine Script v6 indicator that draws in a separate pane. It tracks up to twenty user-selected crypto perpetual symbols and combines four signal classes: trend, momentum, volatility, and volume. The signal mode can use one class, require sev
A price-chart indicator that finds supply and demand zones from leg-in, base and leg-out candle structures. Demand comes from rally-base-rally and drop-base-rally patterns, and supply from rally-base-drop and drop-base-drop, each switchable. Leg and base candl
This strategy combines 9-period and 21-period exponential moving average (EMA) crossovers with dynamic multi-asset correlation monitoring. It fetches asset price data for QQQ, GLD, and TLT, constructing a correlation matrix to evaluate current hedging conditio
Plots the True Strength Index in a separate pane. Price change is smoothed twice with exponential averages, using long and short lengths of 25 and 13 by default, and divided by the same smoothing of absolute change. A signal line is an EMA of the result with a
This indicator plots a volume-weighted average price and three standard-deviation bands on the price chart. It resets the running volume-weighted totals at the selected anchor, which can be the session, week, month, quarter, or year. The source price, band mul
Calculates John F. Ehlers' Distance Coefficient Filter as a distance-weighted finite impulse response filter overlaid directly on the price chart. It weights historical price samples based on the sum of squared price differences across the lookback window, red
This indicator computes and plots the natural logarithm of a selected price series in a separate pane. It evaluates the input series, returning the natural log for positive values and na for values less than or equal to zero. The user can adjust the input sour
Oscillator Divergence Zones calculates nine selectable momentum oscillators, including RSI, CCI, MFI, TSI, STC, and Ehlers filters, to detect regular and hidden divergences. It evaluates price and momentum pivots to spot structural divergence, applying optiona
This indicator plots a fixed lookback Volume Profile alongside 20, 50, and 200 Simple Moving Averages directly on the price chart. It highlights trend changes via moving average crosses and marks Point of Control reactions, High Volume Nodes, and Value Area bo
The Liquidity Void Detector calculates a custom oscillator to identify low-participation price moves in a separate pane. It computes a log volume shock z-score against a moving average baseline and a 1-bar log return z-score. When volume drops below the low-vo
This indicator categorizes price and volume dynamics on each bar by assigning a numeric rank from 0 to 4. It compares the current price and volume to their previous bar values, distinguishing whether price and volume are rising or falling together or diverging
This indicator plots a volume-weighted moving average as the central trend baseline on the price chart and surrounds it with ATR volatility bands. Trend conditions change when price breaks beyond those bands. Presets change the VWMA length and ATR multiplier f
This strategy generates crossover signals using SMA20 and SMA50 on the EURUSD forex pair at 5 decimal places. It enters a long position when the fast SMA crosses above the slow SMA and immediately closes any existing short position. It enters a short position
The P_syn_math_color indicator computes a variable v by applying a series of mathematical functions to given values, including absolute value, trigonometric functions, averages, powers, and random number generation. It also performs color calculations using co
An overlay indicator that sets a trend direction from 50-bar highs and lows, flagging an uptrend on a new high and a downtrend on a new low. Within the trend it detects pivot lows or highs and measures the retracement from the recent extreme, drawing a dashed
This indicator is a multi-symbol debug panel that plots signal state in a separate pane. It watches up to twenty configurable symbols, defaulting to Binance USDT perpetual contracts, and classifies direction with trend, momentum, volatility, and volume methods
A simple price-chart indicator that plots a fast and a slow exponential moving average, defaulting to 20 and 50 periods, with a fill between them. It prints a buy label when the fast average crosses above the slow one and a sell label when it crosses below, an
TN Multi-Audit Sovereign V6 is a Pine Script v6 strategy that overlays on the price chart. It calculates an AuditContext using fast and slow EMAs, HTF EMA from request.security, volume ratio, and volatility. It determines market bias as bullish or bearish base
Plots up volume and down volume as green and red columns in a separate pane, with a small marker colouring the net delta. Values are approximated from lower-timeframe data, chosen automatically or set by the user; a coarser setting gives more history but less
This indicator calculates Kaufman's Efficiency Ratio as a signal-to-noise measure of price movement. It compares the absolute net change over a lookback period with the sum of absolute bar-to-bar changes, then clamps the result between 0 and 1. Values near 1 m
This indicator applies a natural logarithm to a selected price series and plots the transformed values in a separate pane. The single input selects the source, which defaults to the close. Non-positive source values return na instead of a logarithm, and an na
This strategy calculates regular and hidden divergences across selectable momentum oscillators, including RSI, CCI, and MFI, and plots volatility-based divergence zones. It displays oscillator dynamics in a separate pane while projecting support and resistance
Impulse Candles identifies unusually large price bars relative to an Average True Range baseline. It measures candle body size against a user-defined ATR ratio and optionally filters for reversal setups following two consecutive candles of the opposite directi
This indicator calculates a logarithmic regression channel over a configurable lookback period and standard deviation multiplier, plotting upper, lower, and middle channel lines directly on the price chart using Pine Script line objects. It also computes a use
This indicator calculates Price Volume Trend as a running sum of volume scaled by the bar's relative price change. It plots the cumulative PVT line and a simple moving average signal in a separate pane, plus a dashed zero line. The signal period sets the lengt
PF IES probe 01 is a Pine Script v6 strategy that calculates ADX with a custom DI chain using ta.rma smoothing and manual plus/minus DM flow. It applies an ATR-ratio volatility gate comparing current ATR to its 42-period SMA to classify regimes into four categ
P_syn_matrix_map is an indicator script that demonstrates and validates matrix and map data structures in Pine Script v6. It initializes a two-by-two floating-point matrix, modifies its elements, transposes it, and computes matrix sums and averages. Additional
A strategy that buys pullbacks in uptrends and sells rallies in downtrends. Trend comes from fast and slow EMAs with a minimum slope, an optional higher-timeframe EMA check defaulting to daily, and an ADX filter. A setup arms when price stretches an ATR distan
DEPV2 Debug S48 is a multi-symbol crypto indicator that monitors up to 20 cryptocurrency pairs across four analytical categories: trend, momentum, volatility, and volume. It evaluates trading conditions using several signal modes, including single-dimension tr
A simple price-chart indicator that plots five exponential moving averages, defaulting to 8, 13, 21, 34 and 55 periods, as a ribbon with a shaded fill between the fastest and slowest. The ribbon is green when the averages are stacked in bullish order, red when
A Pine v6 strategy that trades smart money concepts on the price chart. It combines a higher-timeframe bias with an EMA, equal highs and lows liquidity, order blocks, fair value gaps and an optional displacement confirmation. Entries are limited to New York an
Teaching script that shows how the var keyword keeps values between bars. It plots the first bar's close, the close of the first green bar and the close of the tenth green bar on the price chart. The comments explain which value each variable holds. It has no
This indicator calculates John Ehlers' 2-Pole Butterworth Filter, an infinite impulse response (IIR) second-order lowpass filter designed to remove high-frequency market noise with minimal phase lag. It processes price data using trigonometric functions and hi
This indicator calculates a Laguerre RSI oscillator using four cascaded Laguerre filter stages applied to closing prices. It measures momentum with reduced time lag compared to a traditional RSI. The script plots the bounded values in a separate pane alongside
Oscillator Topology analyzes the structural shape of a WaveTrend oscillator rather than just its price level or crossover. It evaluates curvature, peak width, asymmetry, and flatness around pivot extremes to categorize oscillator movements into V-Spikes, Round
This strategy detects an inside bar when the current high and low sit inside the previous bar. A bullish inside bar enters long and a bearish inside bar enters short, both on the price chart. The long stop is the entry bar low and the short stop is the entry b
This indicator plots a logarithmic moving average in a separate pane. It weights more recent bars more heavily according to a steepness setting, then smooths the result with a selectable moving-average type. A momentum weight and long and short thresholds mark
The Quadruple Exponential Moving Average (QEMA) indicator calculates a smoothed, low-lag moving average by cascading four exponential moving average stages with dynamic warmup compensation. It plots directly on the price chart as an overlay line. Users can adj
This strategy builds a directional bias from three exponential moving averages drawn on the price chart. It scores bullish and bearish alignment of the fast, slow, and trend averages, plus whether price is above or below that structure, and treats a score at o
The P_syn_operators indicator, written in Pine Script version 6, calculates and plots a series of values based on arithmetic expressions, logical operators, ternary operators, and string functions. Variables a through j are defined with operations including ad
An overlay indicator that looks for the Wyckoff upthrust after distribution pattern. It requires a prior advance measured in ATR, detects a trading range with a minimum duration and boundary tests, and flags a terminal breakout attempt that fails back inside w
DEPV2 DEBUG S5 monitors a multi-ticker basket of up to twenty cryptocurrency pairs across four analytical dimensions: trend, momentum, volatility, and volume. It evaluates market signals using customizable modes, including individual method triggers, simultane
A SuperTrend variant for the price chart based on ATR bands around the midpoint of each bar. When price comes closer to the active band than a noise threshold measured in ATRs, the band is pushed away by an expansion amount instead of tightening, which reduces
This overlay strategy builds a weighted score from three factors. Trend is positive when a fast EMA is above a slow EMA and negative otherwise. Momentum is positive when 14-period RSI is above 50. The volatility factor is positive when close is above a 20-peri
Teaching script on the varip keyword inside a user-defined type. A bar counter increments once per bar and a tick counter increments on every real-time update, and both are plotted in a separate pane. Because the tick counter changes with each update on the li
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.