Skip to content

Indicator Expression Reference

The expression DSL provides 77 indicator functions. Use the names, parameters and output fields below when writing rules; the indicator guide explains how to choose and combine them.

A dash in the default column means the catalog does not specify a default; execution context or a particular parameter combination may supply one. Signatures show reference notation; the Example expression blocks are executable. Parameter aliases name the same choice: an explicit canonical name takes precedence, while repeated identical keys and competing aliases without that canonical choice are rejected.

Download this reference as Markdown.

NWOG — New Week Opening Gap (NWOG)

Gap between Friday close and Sunday/Monday open, a key ICT reference level.

Signature

NWOG({lookback?: number = 1, interval: IntervalString}) -> {gapPercent: number, gapLow: number, gapHigh: number, gapMidpoint: number}[]

Parameters

ParameterDefaultAliases
lookback1—
interval"D"—

Parameter notes

  • lookback: Number of weeks to return
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
gapPercentGap size as a percentage of Friday close
gapLowLower edge of the opening gap
gapHighUpper edge of the opening gap
gapMidpointMidpoint of the opening gap

Example expression

NWOG().gapPercent
AC — Accelerator Oscillator (AC)

Measures the acceleration or deceleration of the driving force behind price movement.

Signature

AC({shortPeriod?: number = 5, longPeriod?: number = 34, signalPeriod?: number = 5, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
shortPeriod5fast
longPeriod34slow
signalPeriod5—
interval"D"—

Parameter notes

  • shortPeriod: Short period for AO calculation
  • longPeriod: Long period for AO calculation
  • signalPeriod: Signal smoothing period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

AC()
AO — Awesome Oscillator

Difference between 5-period and 34-period simple moving averages of the median price.

Signature

AO({interval: IntervalString, shortPeriod?: number = 5, longPeriod?: number = 34}) -> number[]

Parameters

ParameterDefaultAliases
shortPeriod5fast
longPeriod34slow
interval"D"—

Parameter notes

  • shortPeriod: Short period
  • longPeriod: Long period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

AO()
CG — Center of Gravity (CG)

Identifies turning points with minimal lag by weighting recent prices more heavily.

Signature

CG({period?: number = 5, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period5length
interval"D"—

Parameter notes

  • period: CG period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

CG()
ADOSC — Chaikin Oscillator

Difference between fast and slow EMAs of the Accumulation/Distribution line.

Signature

ADOSC({fastLength?: number = 3, slowLength?: number = 10, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
fastLength3shortPeriod, fast
slowLength10longPeriod, slow
interval"D"—

Parameter notes

  • fastLength: Fast EMA period
  • slowLength: Slow EMA period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

ADOSC()
CCI — Commodity Channel Index (CCI)

Measures how far price deviates from its statistical mean.

Signature

CCI({period?: number = 14, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—
source"close"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

CCI()
MOM — Momentum (MOM)

Absolute difference between current price and price N periods ago.

Signature

MOM({period?: number = 14, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—
source"close"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

MOM()
PPO — Percentage Price Oscillator (PPO)

Percentage difference between two EMAs, with a signal line and histogram.

Signature

PPO({fastPeriod?: number = 12, slowPeriod?: number = 26, signalPeriod?: number = 9, interval: IntervalString}) -> {ppo: number, signal: number, histogram: number}[]

Parameters

ParameterDefaultAliases
fastPeriod12shortPeriod, fast
slowPeriod26longPeriod, slow
signalPeriod9signal
interval"D"—

Parameter notes

  • fastPeriod: Fast EMA period
  • slowPeriod: Slow EMA period
  • signalPeriod: Signal EMA period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
ppoPPO line value
signalSignal line (EMA of PPO)
histogramPPO minus signal line

Example expression

PPO().ppo
PVO — Percentage Volume Oscillator (PVO)

Percentage difference between two volume EMAs, with a signal line and histogram.

Signature

PVO({fastPeriod?: number = 12, slowPeriod?: number = 26, signalPeriod?: number = 9, interval: IntervalString}) -> {pvo: number, signal: number, histogram: number}[]

Parameters

ParameterDefaultAliases
fastPeriod12shortPeriod, fast
slowPeriod26longPeriod, slow
signalPeriod9signal
interval"D"—

Parameter notes

  • fastPeriod: Fast EMA period
  • slowPeriod: Slow EMA period
  • signalPeriod: Signal EMA period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
pvoPVO line value
signalSignal line (EMA of PVO)
histogramPVO minus signal line

Example expression

PVO().pvo
RSI2 — RSI 2-Period

2-period RSI for short-term mean-reversion signals. Equivalent to RSI with period 2.

Signature

RSI2({interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
interval"D"—

Parameter notes

  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

RSI2()
ROC — Rate of Change (ROC)

Percentage change between current price and the price N periods ago.

Signature

ROC({period?: number = 14, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—
source"close"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

ROC()
RSI — Relative Strength Index (RSI)

Momentum oscillator measuring the speed and magnitude of price changes (0-100).

Signature

RSI({length?: number = 14, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
length14—
interval"D"—
source"close"—

Parameter notes

  • length: Period length
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

RSI()
STOCH — Stochastic Oscillator

Compares closing price to its range over a period.

Signature

STOCH({kPeriod?: number = 5, kPeriodSlow?: number = 3, dPeriod?: number = 3, dSmoothingType?: string = 'sma', interval: IntervalString}) -> {slowK: number, slowD: number}[]

Parameters

ParameterDefaultAliases
kPeriod5kLength
kPeriodSlow3kSmoothing, kSmooth
dPeriod3dSmoothing, dSmooth
dSmoothingType"sma"—
interval"D"—

Parameter notes

  • kPeriod: K period
  • kPeriodSlow: K slow period
  • dPeriod: D period
  • dSmoothingType: %D smoothing algorithm (sma, ema, or wma)
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
slowKSlow %K line
slowDSlow %D line (SMA of %K)

Example expression

STOCH().slowK
STOCHRSI — Stochastic RSI

Applies the Stochastic formula to RSI values for increased sensitivity.

Signature

STOCHRSI({rsiPeriod?: number = 14, stochasticPeriod?: number = 14, dPeriod?: number = 3, dSmoothingType?: string = 'sma', interval: IntervalString}) -> {fastK: number, fastD: number}[]

Parameters

ParameterDefaultAliases
rsiPeriod14—
stochasticPeriod14stochPeriod
dPeriod3—
dSmoothingType"sma"—
interval"D"—

Parameter notes

  • rsiPeriod: RSI calculation period
  • stochasticPeriod: Stochastic lookback period
  • dPeriod: D smoothing period
  • dSmoothingType: %D smoothing algorithm (sma, ema, or wma)
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
fastKStochRSI %K line
fastDStochRSI %D line (SMA of %K)

Example expression

STOCHRSI().fastK
TSI — True Strength Index (TSI)

Double-smoothed momentum oscillator that measures trend strength and direction.

Signature

TSI({longPeriod?: number = 25, shortPeriod?: number = 13, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
longPeriod25long
shortPeriod13short
interval"D"—

Parameter notes

  • longPeriod: Long smoothing period
  • shortPeriod: Short smoothing period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

TSI()
UO — Ultimate Oscillator (UO)

Multi-period momentum oscillator that combines buying pressure across three lookbacks.

Signature

UO({period1?: number = 7, period2?: number = 14, period3?: number = 28, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period17short
period214medium
period328long
interval"D"—

Parameter notes

  • period1: Short lookback period
  • period2: Medium lookback period
  • period3: Long lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

UO()
WILLR — Williams %R

Oscillator showing overbought/oversold levels (-100 to 0).

Signature

WILLR({period?: number = 14, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

WILLR()
CONSOL — Consolidation Range

Identifies horizontal consolidation ranges where price has been trading sideways.

Signature

CONSOL({lookback?: number = 200, interval?: IntervalString = '1h'}) -> {isConsolidating: number, rangeHigh: number, rangeLow: number}[]

Parameters

ParameterDefaultAliases
lookback200—
interval"D"—

Parameter notes

  • lookback: Number of bars to analyze for consolidation
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
isConsolidatingWhether price is in a consolidation range
rangeHighUpper bound of the consolidation range
rangeLowLower bound of the consolidation range

Example expression

CONSOL().isConsolidating
EXTENTS — Extents

Highest high and lowest low over a rolling window.

Signature

EXTENTS({period?: number = 1, interval: IntervalString}) -> {highest: number, lowest: number}[]

Parameters

ParameterDefaultAliases
period1—
interval"D"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
highestHighest high in the window
lowestLowest low in the window

Example expression

EXTENTS().highest
IB — Initial Balance (IB)

High and low of the first hour of the trading session.

Signature

IB({lookback?: number = 3}) -> {ibHigh: number, ibLow: number}[]

Parameters

ParameterDefaultAliases
lookback3—

Parameter notes

  • lookback: Number of sessions to calculate IB for

Outputs

FieldMeaning
ibHighInitial balance high
ibLowInitial balance low

Example expression

IB().ibHigh
OR — Opening Range (OR)

High and low of the opening range of the trading session.

Signature

OR({duration?: number = 5}) -> {orHigh: number, orLow: number}[]

Parameters

ParameterDefaultAliases
duration5minutes

Parameter notes

  • duration: Opening range duration in minutes from RTH open

Outputs

FieldMeaning
orHighOpening range high
orLowOpening range low

Example expression

OR().orHigh
FIB_LEVELS — Fibonacci Levels

Retracement and extension levels from the most recent completed anchor swing.

Signature

FIB_LEVELS({lookback: number, source: string, anchorProvider: string}) -> {anchorStartPrice: number, anchorEndPrice: number, anchorStartBarsAgo: number, anchorEndBarsAgo: number, swingDirection: number, swingSize: number, anchorConfidence: number, retracement236: number, retracement382: number, retracement500: number, retracement618: number, retracement786: number, extension1272: number, extension1618: number, extension2000: number, extension2618: number}

Parameters

ParameterDefaultAliases
lookback120—
sourcehigh-low—
anchorProviderswing—
leftBars1—
rightBars1—
requireConfirmedtrue—
reversalPercent5—
atrPeriod——
atrMultiplier——
anchorStartBarsAgo——
anchorEndBarsAgo——
anchorStartPrice——
anchorEndPrice——
swingDirection——
interval"D"—

Parameter notes

  • lookback: Bars retained for anchor selection
  • source: Pivot price source: high-low or close
  • anchorProvider: Anchor provider: swing, manual, or zigzag
  • leftBars: Swing provider left bars
  • rightBars: Swing provider right bars
  • requireConfirmed: Require confirmed pivots
  • reversalPercent: ZigZag percentage reversal threshold
  • atrPeriod: ZigZag ATR period
  • atrMultiplier: ZigZag ATR multiplier
  • anchorStartBarsAgo: Manual anchor start offset
  • anchorEndBarsAgo: Manual anchor end offset
  • anchorStartPrice: Manual anchor start price
  • anchorEndPrice: Manual anchor end price
  • swingDirection: Manual anchor direction, 1 for up and -1 for down
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
anchorStartPriceAnchor start price
anchorEndPriceAnchor end price
anchorStartBarsAgoBars since anchor start
anchorEndBarsAgoBars since anchor end
swingDirectionAnchor direction, 1 for upward and -1 for downward
swingSizeAbsolute anchor swing size
anchorConfidenceMinimum provider confidence across anchor pivots
retracement23623.6% retracement level
retracement38238.2% retracement level
retracement50050.0% retracement level
retracement61861.8% retracement level
retracement78678.6% retracement level
extension1272127.2% extension level
extension1618161.8% extension level
extension2000200.0% extension level
extension2618261.8% extension level

Example expression

FIB_LEVELS().anchorStartPrice
FIB_PATTERN — Fibonacci Pattern

Fibonacci harmonic pattern completion signals from pivot providers.

Signature

FIB_PATTERN({pattern: string, lookback: number, source: string, anchorProvider: string}) -> {matched: number, confidence: number, completionPrice: number, stopPrice: number, target1: number, target2: number, ageBars: number, patternDirection: number}

Parameters

ParameterDefaultAliases
patternabcd—
lookback200—
sourcehigh-low—
anchorProviderswing—
leftBars1—
rightBars1—
requireConfirmedtrue—
reversalPercent5—
tolerance0.08—
maxAgeBars20—
xBarsAgo——
aBarsAgo——
bBarsAgo——
cBarsAgo——
dBarsAgo——
xPrice——
aPrice——
bPrice——
cPrice——
dPrice——
patternDirection——
interval"D"—

Parameter notes

  • pattern: Pattern: abcd, gartley, bat, or butterfly
  • lookback: Bars retained for pivot selection
  • source: Pivot price source: high-low or close
  • anchorProvider: Pivot provider: swing, manual, or zigzag
  • leftBars: Swing provider left bars
  • rightBars: Swing provider right bars
  • requireConfirmed: Require confirmed pivots
  • reversalPercent: ZigZag percentage reversal threshold
  • tolerance: Allowed fractional ratio error
  • maxAgeBars: Maximum completion age before a match is stale
  • xBarsAgo: Manual X pivot offset for XABCD patterns
  • aBarsAgo: Manual A pivot offset
  • bBarsAgo: Manual B pivot offset
  • cBarsAgo: Manual C pivot offset
  • dBarsAgo: Manual D pivot offset
  • xPrice: Manual X pivot price
  • aPrice: Manual A pivot price
  • bPrice: Manual B pivot price
  • cPrice: Manual C pivot price
  • dPrice: Manual D pivot price
  • patternDirection: Manual pattern direction, 1 for bullish and -1 for bearish
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
matched1 when the selected pattern is matched
confidenceRatio conformance score from 0 to 1
completionPricePattern completion price
stopPriceProjected stop price
target1First projected target
target2Second projected target
ageBarsBars since the completion pivot
patternDirection1 for bullish, -1 for bearish, 0 for unmatched

Example expression

FIB_PATTERN().matched
APO — Absolute Price Oscillator (APO)

Difference between a fast and slow EMA of price.

Signature

APO({fastLength?: number = 12, slowLength?: number = 26, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
fastLength12shortPeriod, fast
slowLength26longPeriod, slow
interval"D"—

Parameter notes

  • fastLength: Fast EMA period
  • slowLength: Slow EMA period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

APO()
AROON — Aroon Indicator

Identifies trend changes and strength via up/down lines and oscillator.

Signature

AROON({period?: number = 14, interval: IntervalString}) -> {up: number, down: number, oscillator: number}[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
upAroon Up — measures bars since highest high
downAroon Down — measures bars since lowest low
oscillatorAroon Up minus Aroon Down

Example expression

AROON().up
ADX — Average Directional Index (ADX)

Measures trend strength regardless of direction.

Signature

ADX({period?: number = 14, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

ADX()
BOP — Balance of Power (BOP)

Compares the relative strength of buyers and sellers.

Signature

BOP({interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
interval"D"—

Parameter notes

  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

BOP()
CFO — Chande Forecast Oscillator (CFO)

Forecast oscillator from a linear regression projection.

Signature

CFO({period?: number = 14, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

CFO()
DEMA — Double Exponential Moving Average (DEMA)

Reduces lag versus a single EMA.

Signature

DEMA({length?: number = 20, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
length20period
interval"D"—
source"close"—

Parameter notes

  • length: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

DEMA()
DMI — Directional Movement Index (DMI)

Identifies direction of price movement via +DI and -DI lines.

Signature

DMI({period?: number = 14, interval: IntervalString}) -> {plusDi: number, minusDi: number}[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
plusDiPositive directional indicator (+DI)
minusDiNegative directional indicator (-DI)

Example expression

DMI().plusDi
ICHIMOKU — Ichimoku Cloud

Multi-component indicator providing support/resistance, trend direction, and momentum signals. Chart-only displacement is not a function argument. Senkou spans are raw/unshifted and chikouSpan=current close. At source offset n, forward plot displacement d uses senkouSpanA[n+d], senkouSpanB[n+d]; tenkanSen/kijunSen stay at n. Accepted positive integer periods satisfy 0 < tenkanSenPeriod <= kijunSenPeriod <= senkouSpanBPeriod. Bundle warmup: senkouSpanBPeriod bars (largest period); indexed history availability is independent.

Signature

ICHIMOKU({tenkanSenPeriod?: number = 9, kijunSenPeriod?: number = 26, senkouSpanBPeriod?: number = 52, interval: IntervalString}) -> {tenkanSen: number, kijunSen: number, senkouSpanA: number, senkouSpanB: number, chikouSpan: number}[]

Parameters

ParameterDefaultAliases
tenkanSenPeriod9tenkan
kijunSenPeriod26kijun
senkouSpanBPeriod52senkou_b
interval"D"—

Parameter notes

  • tenkanSenPeriod: Tenkan-sen period
  • kijunSenPeriod: Kijun-sen period
  • senkouSpanBPeriod: Source-bar lookback; positive integer periods: 0 < tenkanSenPeriod <= kijunSenPeriod <= senkouSpanBPeriod. Bundle warmup: senkouSpanBPeriod bars (largest period); indexed history availability is independent. Chart-only displacement is not a function argument. Senkou spans are raw/unshifted and chikouSpan=current close. At source offset n, forward displacement d uses senkouSpanA[n+d], senkouSpanB[n+d]; tenkanSen/kijunSen stay at n.
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
tenkanSenConversion line: high/low midpoint over tenkanSenPeriod at the source bar
kijunSenBase line: high/low midpoint over kijunSenPeriod at the source bar
senkouSpanARaw, unshifted Senkou Span A: midpoint of Tenkan and Kijun at the source bar
senkouSpanBRaw, unshifted Senkou Span B: high/low midpoint over senkouSpanBPeriod at the source bar
chikouSpanCurrent source-bar close; backward displacement is a charting convention only

Example expression

ICHIMOKU().tenkanSen
KAMA — Kaufman Adaptive Moving Average (KAMA)

Adaptive moving average that adjusts smoothing based on market efficiency.

Signature

KAMA({length?: number = 20, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
length20period
interval"D"—
source"close"—

Parameter notes

  • length: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

KAMA()
KDJ — Random Index (KDJ)

Extended stochastic oscillator with an additional J line for overbought/oversold signals.

Signature

KDJ({rsv?: number = 3, k?: number = 3, d?: number = 3, interval: IntervalString}) -> {k: number, d: number, j: number}[]

Parameters

ParameterDefaultAliases
rsv3—
k3—
d3—
interval"D"—

Parameter notes

  • rsv: RSV period
  • k: K period
  • d: D period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
kK line (smoothed RSV)
dD line (smoothed K)
jJ line (3K - 2D divergence)

Example expression

KDJ().k
LINREG — Linear Regression

Linear regression slope, projected value, and intercept over a rolling window.

Signature

LINREG({period?: number = 14, interval: IntervalString, source?: PriceSource}) -> {slope: number, value: number, intercept: number}[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—
source"close"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Outputs

FieldMeaning
slopeRegression slope per bar
valueProjected regression value at current bar
interceptY-intercept of the regression line

Example expression

LINREG().slope
MI — Mass Index (MI)

Identifies trend reversals by measuring the narrowing and widening of the range between high and low prices.

Signature

MI({period?: number = 25, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period25length
interval"D"—

Parameter notes

  • period: Period length
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

MI()
MA — Moving Average (MA)

Generic moving average with selectable sub-type.

Signature

MA({length?: number = 20, type?: 'sma'|'ema'|..., interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
length20period
type——
interval"D"—
source"close"—

Parameter notes

  • length: Lookback period
  • type: Moving-average sub-type
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

MA()
SMA — Simple Moving Average (SMA)

Arithmetic mean over the last N bars.

Signature

SMA({length?: number = 20, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
length20period
interval"D"—
source"close"—

Parameter notes

  • length: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

SMA()
EMA — Exponential Moving Average (EMA)

Exponentially weighted moving average.

Signature

EMA({length?: number = 20, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
length20period
interval"D"—
source"close"—

Parameter notes

  • length: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

EMA()
MACD — Moving Average Convergence Divergence (MACD)

Trend-following momentum indicator showing the relationship between two moving averages.

Signature

MACD({shortPeriod?: number = 12, longPeriod?: number = 26, signalPeriod?: number = 9, interval: IntervalString}) -> {macd: number, signal: number, histogram: number}[]

Parameters

ParameterDefaultAliases
shortPeriod12fastLength, fast
longPeriod26slowLength, slow
signalPeriod9signalLength, signal
interval"D"—

Parameter notes

  • shortPeriod: Short EMA period
  • longPeriod: Long EMA period
  • signalPeriod: Signal EMA period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
macdMACD line (fast EMA minus slow EMA)
signalSignal line (EMA of MACD)
histogramMACD minus signal line

Example expression

MACD().macd
SAR — Parabolic SAR

Trailing stop-and-reverse indicator for trend detection.

Signature

SAR({interval: IntervalString, initialAccelerationFactor?: number = 0.02, maxAccelerationFactor?: number = 0.2}) -> number[]

Parameters

ParameterDefaultAliases
initialAccelerationFactor0.02afStep, step
maxAccelerationFactor0.2afMax, max
interval"D"—

Parameter notes

  • initialAccelerationFactor: Initial acceleration factor
  • maxAccelerationFactor: Maximum acceleration factor
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

SAR()
QSTICK — Qstick

Moving average of the difference between open and close prices to quantify buying/selling pressure.

Signature

QSTICK({period?: number = 8, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period8length
interval"D"—

Parameter notes

  • period: Period length
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

QSTICK()
RMA — Rolling Moving Average (RMA)

Wilder’s smoothed moving average.

Signature

RMA({period?: number = 14, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—
source"close"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

RMA()
SINCE_CHANGE — Since Change

Counts the number of bars since the last significant price change exceeding a threshold.

Signature

SINCE_CHANGE({threshold?: number = 0.5, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
threshold0.5—
interval"D"—

Parameter notes

  • threshold: Percentage threshold for significant change
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

SINCE_CHANGE()
TYPPRICE — Typical Price

Average of the high, low, and close prices for each bar.

Signature

TYPPRICE({interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
interval"D"—

Parameter notes

  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

TYPPRICE()
VORTEX — Vortex Indicator

Identifies the start of a new trend or the continuation of an existing trend via +VI and -VI lines.

Signature

VORTEX({period?: number = 14, interval: IntervalString}) -> {plus: number, minus: number}[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
plusPositive vortex indicator (+VI)
minusNegative vortex indicator (-VI)

Example expression

VORTEX().plus
WMA — Weighted Moving Average (WMA)

Linearly weighted moving average emphasising recent prices.

Signature

WMA({length?: number = 20, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
length20period
interval"D"—
source"close"—

Parameter notes

  • length: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

WMA()
WSMA — Wilder's Smoothed Moving Average (WSMA)

Wilder’s smoothing method used internally by RSI and ATR, with a smoothing factor of 1/period.

Signature

WSMA({period?: number = 14, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—
source"close"—

Parameter notes

  • period: Period length
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

WSMA()
ACCEL_BANDS — Acceleration Bands

Envelope bands that adapt to volatility using a standard deviation multiplier.

Signature

ACCEL_BANDS({period?: number = 20, interval: IntervalString}) -> {upper: number, lower: number}[]

Parameters

ParameterDefaultAliases
period20length
interval"D"—

Parameter notes

  • period: Period length
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
upperUpper acceleration band
lowerLower acceleration band

Example expression

ACCEL_BANDS().upper
ATR — Average True Range (ATR)

Measures market volatility by decomposing the range of an asset price.

Signature

ATR({period?: number = 14, interval: IntervalString, normalized?: boolean = false}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—
normalizedfalse—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • normalized: Return ATR normalized to price (100 * ATR / close)

Output

Returns a numeric series; use the function directly.

Example expression

ATR()
NATR — Normalized Average True Range (NATR)

ATR expressed as a percentage of the closing price for cross-instrument comparison.

Signature

NATR({period?: number = 14, interval: IntervalString, normalized?: boolean = true}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—
normalizedtrue—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • normalized: Return ATR normalized to price (100 * ATR / close)

Output

Returns a numeric series; use the function directly.

Example expression

NATR()
BBANDS — Bollinger Bands

Volatility bands placed above and below a moving average.

Signature

BBANDS({period?: number = 20, stdDev?: number = 2, interval: IntervalString, source?: PriceSource}) -> {upper: number, middle: number, lower: number}[]

Parameters

ParameterDefaultAliases
period20length
stdDev2—
interval"D"—
source"close"—

Parameter notes

  • period: SMA period
  • stdDev: Standard deviation multiplier
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Outputs

FieldMeaning
upperUpper Bollinger Band
middleMiddle band (SMA)
lowerLower Bollinger Band

Example expression

BBANDS().upper
BBW — Bollinger Bands Width (BBW)

Width of Bollinger Bands as a ratio, useful for identifying squeezes.

Signature

BBW({period?: number = 20, stdDev?: number = 2, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period20length
stdDev2—
interval"D"—

Parameter notes

  • period: Period length
  • stdDev: Standard deviation multiplier
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

BBW()
BBPCTB — Bollinger Percent B

Shows where price is relative to the Bollinger Bands (0 = lower band, 1 = upper band).

Signature

BBPCTB({period?: number = 20, stdDev?: number = 2, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period20length
stdDev2—
interval"D"—

Parameter notes

  • period: Period length
  • stdDev: Standard deviation multiplier
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

BBPCTB()
CHANDELIER — Chandelier Exit

ATR-based trailing stop that hangs from the highest high or lowest low.

Signature

CHANDELIER({interval: IntervalString, period?: number = 22, multiplier?: number = 3}) -> {longExit: number, shortExit: number}[]

Parameters

ParameterDefaultAliases
period22length
multiplier3factor
interval"D"—

Parameter notes

  • period: ATR and high/low lookback length
  • multiplier: ATR multiplier
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
longExitLong exit stop level
shortExitShort exit stop level

Example expression

CHANDELIER().longExit
DONCHIAN — Donchian Channel (DC)

Channels formed by the highest high and lowest low over a lookback period.

Signature

DONCHIAN({interval: IntervalString, period?: number = 20}) -> {upper: number, middle: number, lower: number}[]

Parameters

ParameterDefaultAliases
period20length
interval"D"—

Parameter notes

  • period: Period length
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
upperHighest high over the period
middleMidpoint of upper and lower channels
lowerLowest low over the period

Example expression

DONCHIAN().upper
KC — Keltner Channel (KC)

Volatility-based envelope set above and below an EMA using ATR.

Signature

KC({emaPeriod?: number = 20, atrPeriod?: number = 10, multiplier?: number = 2, interval: IntervalString}) -> {upper: number, middle: number, lower: number}[]

Parameters

ParameterDefaultAliases
emaPeriod20—
atrPeriod10—
multiplier2factor
interval"D"—

Parameter notes

  • emaPeriod: EMA period for the middle band
  • atrPeriod: ATR period for channel width
  • multiplier: ATR multiplier for upper/lower bands
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
upperUpper Keltner channel
middleMiddle band (EMA)
lowerLower Keltner channel

Example expression

KC().upper
MAD — Mean Absolute Deviation (MAD)

Average absolute deviation of price from its mean over a rolling window.

Signature

MAD({period?: number = 14, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—
source"close"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

MAD()
MSTD — Moving Standard Deviation (MSTD)

Rolling standard deviation of price, commonly used as a volatility measure.

Signature

MSTD({period?: number = 20, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
period20length
interval"D"—
source"close"—

Parameter notes

  • period: Period length
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

MSTD()
PO — Projection Oscillator (PO)

Measures where the current price sits within the projection band range.

Signature

PO({period?: number = 14, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

PO()
SUPERTREND — SuperTrend

ATR-based trend-following stop and reverse indicator.

Signature

SUPERTREND({atrPeriod?: number = 10, multiplier?: number = 3, interval: IntervalString}) -> {value: number, direction: number}[]

Parameters

ParameterDefaultAliases
atrPeriod10—
multiplier3factor
interval"D"—

Parameter notes

  • atrPeriod: ATR lookback period
  • multiplier: ATR multiplier
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
valueSuperTrend stop level
directionTrend direction (1 = up, -1 = down)

Example expression

SUPERTREND().value
TR — True Range (TR)

Maximum of (high-low), abs(high-prevClose), abs(low-prevClose) for each bar.

Signature

TR({interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
interval"D"—

Parameter notes

  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

TR()
UI — Ulcer Index (UI)

Measures downside volatility by tracking the depth and duration of drawdowns.

Signature

UI({period?: number = 14, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

UI()
AD — Accumulation/Distribution (A/D)

Cumulative indicator using volume and price to assess whether an asset is being accumulated or distributed.

Signature

AD({interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
interval"D"—

Parameter notes

  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

AD()
CMF — Chaikin Money Flow (CMF)

Volume-weighted average of accumulation/distribution over a period.

Signature

CMF({period?: number = 21, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period21—
interval"D"—

Parameter notes

  • period: Period length
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

CMF()
EMV — Ease of Movement (EMV)

Relates price change to volume, showing how easily price moves.

Signature

EMV({interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period14length
volumeDivisor——
interval"D"—

Parameter notes

  • period: Lookback period
  • volumeDivisor: Volume scaling divisor
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

EMV()
FI — Force Index (FI)

Combines price change and volume to measure the force behind price movements.

Signature

FI({period?: number = 13, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period13length
interval"D"—

Parameter notes

  • period: Period length
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

FI()
MFI — Money Flow Index (MFI)

Volume-weighted RSI measuring buying and selling pressure (0-100).

Signature

MFI({period?: number = 14, interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
period14length
interval"D"—

Parameter notes

  • period: Lookback period
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

MFI()
NVI — Negative Volume Index (NVI)

Cumulative index that changes only on days when volume decreases from the prior day.

Signature

NVI({interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
interval"D"—

Parameter notes

  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

NVI()
OBV — On-Balance Volume (OBV)

Cumulative volume-based indicator that adds or subtracts volume based on price direction.

Signature

OBV({interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
interval"D"—

Parameter notes

  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

OBV()
PVI — Positive Volume Index (PVI)

Cumulative index that changes only on days when volume increases from the prior day.

Signature

PVI({interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
interval"D"—

Parameter notes

  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

PVI()
VOL_ANOMALY — Volume Anomaly

Detects bars where volume significantly deviates from the recent average.

Signature

VOL_ANOMALY({length?: number = 20, lookback?: number = 5, interval?: IntervalString = '5'}) -> number[]

Parameters

ParameterDefaultAliases
length20period
lookback5—
interval"D"—

Parameter notes

  • length: Comparison length for anomaly detection
  • lookback: Number of bars to analyze
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

VOL_ANOMALY()
VPT — Volume Price Trend (VPT)

Cumulative volume indicator weighted by the percentage change in price.

Signature

VPT({interval: IntervalString}) -> number[]

Parameters

ParameterDefaultAliases
interval"D"—

Parameter notes

  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Output

Returns a numeric series; use the function directly.

Example expression

VPT()
VWAP — Session Volume Weighted Average Price (VWAP)

Average price weighted by volume, commonly used as an intraday benchmark. An optional interval selects the source bars; omitted, VWAP uses the strategy interval.

Signature

VWAP({lookback?: number = 1, interval?: IntervalString}) -> {upper: number, vwap: number, lower: number}[]

Parameters

ParameterDefaultAliases
lookback1—
interval——

Parameter notes

  • lookback: Number of sessions to look back for VWAP calculation
  • interval: Optional source bar interval (e.g. ‘15m’, ‘1h’, ‘D’); defaults to the strategy interval

Outputs

FieldMeaning
upperUpper VWAP band
vwapVolume-weighted average price
lowerLower VWAP band

Example expression

VWAP().upper
VWMA — Volume Weighted Moving Average (VWMA)

Moving average weighted by volume, giving more weight to periods with higher volume.

Signature

VWMA({period?: number = 20, interval: IntervalString, source?: PriceSource}) -> number[]

Parameters

ParameterDefaultAliases
period20length
interval"D"—
source"close"—

Parameter notes

  • period: Period length
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
  • source: Bar price source (e.g. ‘close’)

Output

Returns a numeric series; use the function directly.

Example expression

VWMA()
SVP — Session Volume Profile (SVP)

Distribution of volume at each calendar-aligned profile period, with point of control and value area.

Signature

SVP({interval?: IntervalString = 'D', eth?: boolean = true, lookback?: number = 1, dataInterval?: IntervalString = '30', valueArea?: number = 0.68, ticksPerRow?: number = 8, tickSize?: number}) -> VolumeProfileOutput[]

Parameters

ParameterDefaultAliases
ethtrue—
interval"D"—
lookback1—
dataInterval"30"—
valueArea0.68—
ticksPerRow8ticks_per_row
tickSize—tick_size

Parameter notes

  • eth: Include ETH input; false selects regular-session candles
  • interval: Calendar-aligned profile period: ‘D’, ‘W’, ‘M’, or ‘Y’
  • lookback: Number of separate profile periods retained, including the developing period
  • dataInterval: Bar interval used to build the profile within each period (e.g. ‘30’)
  • valueArea: Value area percentage
  • ticksPerRow: Positive integer number of instrument ticks grouped into each fixed profile row
  • tickSize: Positive minimum price increment; defaults to the instrument contract increment

Outputs

FieldMeaning
pocPoint of control (price level with highest volume)
vahValue area high
valValue area low
totalVolumeTotal volume in the profile
hvnHighest-volume node in the profile
lvnLowest-volume node in the profile
nearestHvnAboveNearest high-volume node above price
nearestHvnBelowNearest high-volume node below price
nearestLvnAboveNearest low-volume node above price
nearestLvnBelowNearest low-volume node below price
distributionCountNumber of meaningful distributions
balanceScoreBalanced/D-shape score
trendScoreTrend/elongation score
doubleDistributionScoreDouble-distribution score
profileShapeNumeric profile shape class: 0 unknown, 1 balanced/D, 2 P, 3 b, 4 double distribution, 5 trend

Example expression

SVP().poc
VP — Volume Profile (VP)

Rolling non-session volume profile over a fixed lookback window of bars.

Signature

VP({lookback?: number = 20, interval?: IntervalString = '30', valueArea?: number = 0.68, ticksPerRow?: number = 8, tickSize?: number}) -> VolumeProfileOutput[]

Parameters

ParameterDefaultAliases
lookback20—
interval"30"—
valueArea0.68—
ticksPerRow8ticks_per_row
tickSize—tick_size

Parameter notes

  • lookback: Number of trailing bars to include
  • interval: Bar interval used to build the rolling profile
  • valueArea: Value area percentage
  • ticksPerRow: Positive integer number of instrument ticks grouped into each fixed profile row
  • tickSize: Positive minimum price increment; defaults to the instrument contract increment

Outputs

FieldMeaning
pocPoint of control (price level with highest volume)
vahValue area high
valValue area low
totalVolumeTotal volume in the profile
hvnHighest-volume node in the profile
lvnLowest-volume node in the profile
nearestHvnAboveNearest high-volume node above price
nearestHvnBelowNearest high-volume node below price
nearestLvnAboveNearest low-volume node above price
nearestLvnBelowNearest low-volume node below price
distributionCountNumber of meaningful distributions
balanceScoreBalanced/D-shape score
trendScoreTrend/elongation score
doubleDistributionScoreDouble-distribution score
profileShapeNumeric profile shape class: 0 unknown, 1 balanced/D, 2 P, 3 b, 4 double distribution, 5 trend

Example expression

VP().poc
AVP — Anchored Volume Profile (AVP)

Volume profile anchored by a typed barsAgo anchor.

Signature

AVP({anchor: {type: 'barsAgo', value: number, interval?: IntervalString}, dataInterval?: IntervalString = '30', valueArea?: number = 0.68, ticksPerRow?: number = 8, tickSize?: number}) -> VolumeProfileOutput[]

Parameters

ParameterDefaultAliases
anchor——
barsAgo——
dataInterval"30"—
valueArea0.68—
ticksPerRow8ticks_per_row
tickSize—tick_size
interval"D"—

Parameter notes

  • anchor: Typed anchor object; currently supports {type: ‘barsAgo’, value: number}
  • barsAgo: Flat runtime bars-ago anchor value
  • dataInterval: Bar interval used to build the profile
  • valueArea: Value area percentage
  • ticksPerRow: Positive integer number of instrument ticks grouped into each fixed profile row
  • tickSize: Positive minimum price increment; defaults to the instrument contract increment
  • interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)

Outputs

FieldMeaning
pocPoint of control (price level with highest volume)
vahValue area high
valValue area low
totalVolumeTotal volume in the profile
hvnHighest-volume node in the profile
lvnLowest-volume node in the profile
nearestHvnAboveNearest high-volume node above price
nearestHvnBelowNearest high-volume node below price
nearestLvnAboveNearest low-volume node above price
nearestLvnBelowNearest low-volume node below price
distributionCountNumber of meaningful distributions
balanceScoreBalanced/D-shape score
trendScoreTrend/elongation score
doubleDistributionScoreDouble-distribution score
profileShapeNumeric profile shape class: 0 unknown, 1 balanced/D, 2 P, 3 b, 4 double distribution, 5 trend

Example expression

AVP().poc