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
| Parameter | Default | Aliases |
|---|---|---|
lookback | 1 | — |
interval | "D" | — |
Parameter notes
lookback: Number of weeks to returninterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
gapPercent | Gap size as a percentage of Friday close |
gapLow | Lower edge of the opening gap |
gapHigh | Upper edge of the opening gap |
gapMidpoint | Midpoint of the opening gap |
Example expression
NWOG().gapPercentMomentum
Section titled “Momentum”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
| Parameter | Default | Aliases |
|---|---|---|
shortPeriod | 5 | fast |
longPeriod | 34 | slow |
signalPeriod | 5 | — |
interval | "D" | — |
Parameter notes
shortPeriod: Short period for AO calculationlongPeriod: Long period for AO calculationsignalPeriod: Signal smoothing periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
shortPeriod | 5 | fast |
longPeriod | 34 | slow |
interval | "D" | — |
Parameter notes
shortPeriod: Short periodlongPeriod: Long periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 5 | length |
interval | "D" | — |
Parameter notes
period: CG periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
fastLength | 3 | shortPeriod, fast |
slowLength | 10 | longPeriod, slow |
interval | "D" | — |
Parameter notes
fastLength: Fast EMA periodslowLength: Slow EMA periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
source | "close" | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
source | "close" | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
fastPeriod | 12 | shortPeriod, fast |
slowPeriod | 26 | longPeriod, slow |
signalPeriod | 9 | signal |
interval | "D" | — |
Parameter notes
fastPeriod: Fast EMA periodslowPeriod: Slow EMA periodsignalPeriod: Signal EMA periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
ppo | PPO line value |
signal | Signal line (EMA of PPO) |
histogram | PPO minus signal line |
Example expression
PPO().ppoPVO — 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
| Parameter | Default | Aliases |
|---|---|---|
fastPeriod | 12 | shortPeriod, fast |
slowPeriod | 26 | longPeriod, slow |
signalPeriod | 9 | signal |
interval | "D" | — |
Parameter notes
fastPeriod: Fast EMA periodslowPeriod: Slow EMA periodsignalPeriod: Signal EMA periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
pvo | PVO line value |
signal | Signal line (EMA of PVO) |
histogram | PVO minus signal line |
Example expression
PVO().pvoRSI2 — RSI 2-Period
2-period RSI for short-term mean-reversion signals. Equivalent to RSI with period 2.
Signature
RSI2({interval: IntervalString}) -> number[]Parameters
| Parameter | Default | Aliases |
|---|---|---|
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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
source | "close" | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
length | 14 | — |
interval | "D" | — |
source | "close" | — |
Parameter notes
length: Period lengthinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
kPeriod | 5 | kLength |
kPeriodSlow | 3 | kSmoothing, kSmooth |
dPeriod | 3 | dSmoothing, dSmooth |
dSmoothingType | "sma" | — |
interval | "D" | — |
Parameter notes
kPeriod: K periodkPeriodSlow: K slow perioddPeriod: D perioddSmoothingType: %D smoothing algorithm (sma, ema, or wma)interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
slowK | Slow %K line |
slowD | Slow %D line (SMA of %K) |
Example expression
STOCH().slowKSTOCHRSI — 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
| Parameter | Default | Aliases |
|---|---|---|
rsiPeriod | 14 | — |
stochasticPeriod | 14 | stochPeriod |
dPeriod | 3 | — |
dSmoothingType | "sma" | — |
interval | "D" | — |
Parameter notes
rsiPeriod: RSI calculation periodstochasticPeriod: Stochastic lookback perioddPeriod: D smoothing perioddSmoothingType: %D smoothing algorithm (sma, ema, or wma)interval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
fastK | StochRSI %K line |
fastD | StochRSI %D line (SMA of %K) |
Example expression
STOCHRSI().fastKTSI — 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
| Parameter | Default | Aliases |
|---|---|---|
longPeriod | 25 | long |
shortPeriod | 13 | short |
interval | "D" | — |
Parameter notes
longPeriod: Long smoothing periodshortPeriod: Short smoothing periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period1 | 7 | short |
period2 | 14 | medium |
period3 | 28 | long |
interval | "D" | — |
Parameter notes
period1: Short lookback periodperiod2: Medium lookback periodperiod3: Long lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
Parameter notes
period: Lookback periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Output
Returns a numeric series; use the function directly.
Example expression
WILLR()Structure
Section titled “Structure”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
| Parameter | Default | Aliases |
|---|---|---|
lookback | 200 | — |
interval | "D" | — |
Parameter notes
lookback: Number of bars to analyze for consolidationinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
isConsolidating | Whether price is in a consolidation range |
rangeHigh | Upper bound of the consolidation range |
rangeLow | Lower bound of the consolidation range |
Example expression
CONSOL().isConsolidatingEXTENTS — Extents
Highest high and lowest low over a rolling window.
Signature
EXTENTS({period?: number = 1, interval: IntervalString}) -> {highest: number, lowest: number}[]Parameters
| Parameter | Default | Aliases |
|---|---|---|
period | 1 | — |
interval | "D" | — |
Parameter notes
period: Lookback periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
highest | Highest high in the window |
lowest | Lowest low in the window |
Example expression
EXTENTS().highestIB — Initial Balance (IB)
High and low of the first hour of the trading session.
Signature
IB({lookback?: number = 3}) -> {ibHigh: number, ibLow: number}[]Parameters
| Parameter | Default | Aliases |
|---|---|---|
lookback | 3 | — |
Parameter notes
lookback: Number of sessions to calculate IB for
Outputs
| Field | Meaning |
|---|---|
ibHigh | Initial balance high |
ibLow | Initial balance low |
Example expression
IB().ibHighOR — Opening Range (OR)
High and low of the opening range of the trading session.
Signature
OR({duration?: number = 5}) -> {orHigh: number, orLow: number}[]Parameters
| Parameter | Default | Aliases |
|---|---|---|
duration | 5 | minutes |
Parameter notes
duration: Opening range duration in minutes from RTH open
Outputs
| Field | Meaning |
|---|---|
orHigh | Opening range high |
orLow | Opening range low |
Example expression
OR().orHighFIB_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
| Parameter | Default | Aliases |
|---|---|---|
lookback | 120 | — |
source | high-low | — |
anchorProvider | swing | — |
leftBars | 1 | — |
rightBars | 1 | — |
requireConfirmed | true | — |
reversalPercent | 5 | — |
atrPeriod | — | — |
atrMultiplier | — | — |
anchorStartBarsAgo | — | — |
anchorEndBarsAgo | — | — |
anchorStartPrice | — | — |
anchorEndPrice | — | — |
swingDirection | — | — |
interval | "D" | — |
Parameter notes
lookback: Bars retained for anchor selectionsource: Pivot price source: high-low or closeanchorProvider: Anchor provider: swing, manual, or zigzagleftBars: Swing provider left barsrightBars: Swing provider right barsrequireConfirmed: Require confirmed pivotsreversalPercent: ZigZag percentage reversal thresholdatrPeriod: ZigZag ATR periodatrMultiplier: ZigZag ATR multiplieranchorStartBarsAgo: Manual anchor start offsetanchorEndBarsAgo: Manual anchor end offsetanchorStartPrice: Manual anchor start priceanchorEndPrice: Manual anchor end priceswingDirection: Manual anchor direction, 1 for up and -1 for downinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
anchorStartPrice | Anchor start price |
anchorEndPrice | Anchor end price |
anchorStartBarsAgo | Bars since anchor start |
anchorEndBarsAgo | Bars since anchor end |
swingDirection | Anchor direction, 1 for upward and -1 for downward |
swingSize | Absolute anchor swing size |
anchorConfidence | Minimum provider confidence across anchor pivots |
retracement236 | 23.6% retracement level |
retracement382 | 38.2% retracement level |
retracement500 | 50.0% retracement level |
retracement618 | 61.8% retracement level |
retracement786 | 78.6% retracement level |
extension1272 | 127.2% extension level |
extension1618 | 161.8% extension level |
extension2000 | 200.0% extension level |
extension2618 | 261.8% extension level |
Example expression
FIB_LEVELS().anchorStartPriceFIB_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
| Parameter | Default | Aliases |
|---|---|---|
pattern | abcd | — |
lookback | 200 | — |
source | high-low | — |
anchorProvider | swing | — |
leftBars | 1 | — |
rightBars | 1 | — |
requireConfirmed | true | — |
reversalPercent | 5 | — |
tolerance | 0.08 | — |
maxAgeBars | 20 | — |
xBarsAgo | — | — |
aBarsAgo | — | — |
bBarsAgo | — | — |
cBarsAgo | — | — |
dBarsAgo | — | — |
xPrice | — | — |
aPrice | — | — |
bPrice | — | — |
cPrice | — | — |
dPrice | — | — |
patternDirection | — | — |
interval | "D" | — |
Parameter notes
pattern: Pattern: abcd, gartley, bat, or butterflylookback: Bars retained for pivot selectionsource: Pivot price source: high-low or closeanchorProvider: Pivot provider: swing, manual, or zigzagleftBars: Swing provider left barsrightBars: Swing provider right barsrequireConfirmed: Require confirmed pivotsreversalPercent: ZigZag percentage reversal thresholdtolerance: Allowed fractional ratio errormaxAgeBars: Maximum completion age before a match is stalexBarsAgo: Manual X pivot offset for XABCD patternsaBarsAgo: Manual A pivot offsetbBarsAgo: Manual B pivot offsetcBarsAgo: Manual C pivot offsetdBarsAgo: Manual D pivot offsetxPrice: Manual X pivot priceaPrice: Manual A pivot pricebPrice: Manual B pivot pricecPrice: Manual C pivot pricedPrice: Manual D pivot pricepatternDirection: Manual pattern direction, 1 for bullish and -1 for bearishinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
matched | 1 when the selected pattern is matched |
confidence | Ratio conformance score from 0 to 1 |
completionPrice | Pattern completion price |
stopPrice | Projected stop price |
target1 | First projected target |
target2 | Second projected target |
ageBars | Bars since the completion pivot |
patternDirection | 1 for bullish, -1 for bearish, 0 for unmatched |
Example expression
FIB_PATTERN().matchedAPO — 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
| Parameter | Default | Aliases |
|---|---|---|
fastLength | 12 | shortPeriod, fast |
slowLength | 26 | longPeriod, slow |
interval | "D" | — |
Parameter notes
fastLength: Fast EMA periodslowLength: Slow EMA periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
Parameter notes
period: Lookback periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
up | Aroon Up — measures bars since highest high |
down | Aroon Down — measures bars since lowest low |
oscillator | Aroon Up minus Aroon Down |
Example expression
AROON().upADX — Average Directional Index (ADX)
Measures trend strength regardless of direction.
Signature
ADX({period?: number = 14, interval: IntervalString}) -> number[]Parameters
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
length | 20 | period |
interval | "D" | — |
source | "close" | — |
Parameter notes
length: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
Parameter notes
period: Lookback periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
plusDi | Positive directional indicator (+DI) |
minusDi | Negative directional indicator (-DI) |
Example expression
DMI().plusDiICHIMOKU — 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
| Parameter | Default | Aliases |
|---|---|---|
tenkanSenPeriod | 9 | tenkan |
kijunSenPeriod | 26 | kijun |
senkouSpanBPeriod | 52 | senkou_b |
interval | "D" | — |
Parameter notes
tenkanSenPeriod: Tenkan-sen periodkijunSenPeriod: Kijun-sen periodsenkouSpanBPeriod: 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
| Field | Meaning |
|---|---|
tenkanSen | Conversion line: high/low midpoint over tenkanSenPeriod at the source bar |
kijunSen | Base line: high/low midpoint over kijunSenPeriod at the source bar |
senkouSpanA | Raw, unshifted Senkou Span A: midpoint of Tenkan and Kijun at the source bar |
senkouSpanB | Raw, unshifted Senkou Span B: high/low midpoint over senkouSpanBPeriod at the source bar |
chikouSpan | Current source-bar close; backward displacement is a charting convention only |
Example expression
ICHIMOKU().tenkanSenKAMA — 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
| Parameter | Default | Aliases |
|---|---|---|
length | 20 | period |
interval | "D" | — |
source | "close" | — |
Parameter notes
length: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
rsv | 3 | — |
k | 3 | — |
d | 3 | — |
interval | "D" | — |
Parameter notes
rsv: RSV periodk: K periodd: D periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
k | K line (smoothed RSV) |
d | D line (smoothed K) |
j | J line (3K - 2D divergence) |
Example expression
KDJ().kLINREG — 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
source | "close" | — |
Parameter notes
period: Lookback periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)source: Bar price source (e.g. ‘close’)
Outputs
| Field | Meaning |
|---|---|
slope | Regression slope per bar |
value | Projected regression value at current bar |
intercept | Y-intercept of the regression line |
Example expression
LINREG().slopeMI — 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
| Parameter | Default | Aliases |
|---|---|---|
period | 25 | length |
interval | "D" | — |
Parameter notes
period: Period lengthinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
length | 20 | period |
type | — | — |
interval | "D" | — |
source | "close" | — |
Parameter notes
length: Lookback periodtype: Moving-average sub-typeinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
length | 20 | period |
interval | "D" | — |
source | "close" | — |
Parameter notes
length: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
length | 20 | period |
interval | "D" | — |
source | "close" | — |
Parameter notes
length: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
shortPeriod | 12 | fastLength, fast |
longPeriod | 26 | slowLength, slow |
signalPeriod | 9 | signalLength, signal |
interval | "D" | — |
Parameter notes
shortPeriod: Short EMA periodlongPeriod: Long EMA periodsignalPeriod: Signal EMA periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
macd | MACD line (fast EMA minus slow EMA) |
signal | Signal line (EMA of MACD) |
histogram | MACD minus signal line |
Example expression
MACD().macdSAR — Parabolic SAR
Trailing stop-and-reverse indicator for trend detection.
Signature
SAR({interval: IntervalString, initialAccelerationFactor?: number = 0.02, maxAccelerationFactor?: number = 0.2}) -> number[]Parameters
| Parameter | Default | Aliases |
|---|---|---|
initialAccelerationFactor | 0.02 | afStep, step |
maxAccelerationFactor | 0.2 | afMax, max |
interval | "D" | — |
Parameter notes
initialAccelerationFactor: Initial acceleration factormaxAccelerationFactor: Maximum acceleration factorinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 8 | length |
interval | "D" | — |
Parameter notes
period: Period lengthinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
source | "close" | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
threshold | 0.5 | — |
interval | "D" | — |
Parameter notes
threshold: Percentage threshold for significant changeinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
Parameter notes
period: Lookback periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
plus | Positive vortex indicator (+VI) |
minus | Negative vortex indicator (-VI) |
Example expression
VORTEX().plusWMA — Weighted Moving Average (WMA)
Linearly weighted moving average emphasising recent prices.
Signature
WMA({length?: number = 20, interval: IntervalString, source?: PriceSource}) -> number[]Parameters
| Parameter | Default | Aliases |
|---|---|---|
length | 20 | period |
interval | "D" | — |
source | "close" | — |
Parameter notes
length: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
source | "close" | — |
Parameter notes
period: Period lengthinterval: 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()Volatility
Section titled “Volatility”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
| Parameter | Default | Aliases |
|---|---|---|
period | 20 | length |
interval | "D" | — |
Parameter notes
period: Period lengthinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
upper | Upper acceleration band |
lower | Lower acceleration band |
Example expression
ACCEL_BANDS().upperATR — 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
normalized | false | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
normalized | true | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 20 | length |
stdDev | 2 | — |
interval | "D" | — |
source | "close" | — |
Parameter notes
period: SMA periodstdDev: Standard deviation multiplierinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)source: Bar price source (e.g. ‘close’)
Outputs
| Field | Meaning |
|---|---|
upper | Upper Bollinger Band |
middle | Middle band (SMA) |
lower | Lower Bollinger Band |
Example expression
BBANDS().upperBBW — 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
| Parameter | Default | Aliases |
|---|---|---|
period | 20 | length |
stdDev | 2 | — |
interval | "D" | — |
Parameter notes
period: Period lengthstdDev: Standard deviation multiplierinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 20 | length |
stdDev | 2 | — |
interval | "D" | — |
Parameter notes
period: Period lengthstdDev: Standard deviation multiplierinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 22 | length |
multiplier | 3 | factor |
interval | "D" | — |
Parameter notes
period: ATR and high/low lookback lengthmultiplier: ATR multiplierinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
longExit | Long exit stop level |
shortExit | Short exit stop level |
Example expression
CHANDELIER().longExitDONCHIAN — 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
| Parameter | Default | Aliases |
|---|---|---|
period | 20 | length |
interval | "D" | — |
Parameter notes
period: Period lengthinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
upper | Highest high over the period |
middle | Midpoint of upper and lower channels |
lower | Lowest low over the period |
Example expression
DONCHIAN().upperKC — 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
| Parameter | Default | Aliases |
|---|---|---|
emaPeriod | 20 | — |
atrPeriod | 10 | — |
multiplier | 2 | factor |
interval | "D" | — |
Parameter notes
emaPeriod: EMA period for the middle bandatrPeriod: ATR period for channel widthmultiplier: ATR multiplier for upper/lower bandsinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
upper | Upper Keltner channel |
middle | Middle band (EMA) |
lower | Lower Keltner channel |
Example expression
KC().upperMAD — 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
source | "close" | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 20 | length |
interval | "D" | — |
source | "close" | — |
Parameter notes
period: Period lengthinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
atrPeriod | 10 | — |
multiplier | 3 | factor |
interval | "D" | — |
Parameter notes
atrPeriod: ATR lookback periodmultiplier: ATR multiplierinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
value | SuperTrend stop level |
direction | Trend direction (1 = up, -1 = down) |
Example expression
SUPERTREND().valueTR — True Range (TR)
Maximum of (high-low), abs(high-prevClose), abs(low-prevClose) for each bar.
Signature
TR({interval: IntervalString}) -> number[]Parameters
| Parameter | Default | Aliases |
|---|---|---|
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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
Parameter notes
period: Lookback periodinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Output
Returns a numeric series; use the function directly.
Example expression
UI()Volume
Section titled “Volume”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
| Parameter | Default | Aliases |
|---|---|---|
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
| Parameter | Default | Aliases |
|---|---|---|
period | 21 | — |
interval | "D" | — |
Parameter notes
period: Period lengthinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
volumeDivisor | — | — |
interval | "D" | — |
Parameter notes
period: Lookback periodvolumeDivisor: Volume scaling divisorinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 13 | length |
interval | "D" | — |
Parameter notes
period: Period lengthinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
period | 14 | length |
interval | "D" | — |
Parameter notes
period: Lookback periodinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
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
| Parameter | Default | Aliases |
|---|---|---|
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
| Parameter | Default | Aliases |
|---|---|---|
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
| Parameter | Default | Aliases |
|---|---|---|
length | 20 | period |
lookback | 5 | — |
interval | "D" | — |
Parameter notes
length: Comparison length for anomaly detectionlookback: Number of bars to analyzeinterval: 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
| Parameter | Default | Aliases |
|---|---|---|
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
| Parameter | Default | Aliases |
|---|---|---|
lookback | 1 | — |
interval | — | — |
Parameter notes
lookback: Number of sessions to look back for VWAP calculationinterval: Optional source bar interval (e.g. ‘15m’, ‘1h’, ‘D’); defaults to the strategy interval
Outputs
| Field | Meaning |
|---|---|
upper | Upper VWAP band |
vwap | Volume-weighted average price |
lower | Lower VWAP band |
Example expression
VWAP().upperVWMA — 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
| Parameter | Default | Aliases |
|---|---|---|
period | 20 | length |
interval | "D" | — |
source | "close" | — |
Parameter notes
period: Period lengthinterval: 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()Volume Profile
Section titled “Volume Profile”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
| Parameter | Default | Aliases |
|---|---|---|
eth | true | — |
interval | "D" | — |
lookback | 1 | — |
dataInterval | "30" | — |
valueArea | 0.68 | — |
ticksPerRow | 8 | ticks_per_row |
tickSize | — | tick_size |
Parameter notes
eth: Include ETH input; false selects regular-session candlesinterval: Calendar-aligned profile period: ‘D’, ‘W’, ‘M’, or ‘Y’lookback: Number of separate profile periods retained, including the developing perioddataInterval: Bar interval used to build the profile within each period (e.g. ‘30’)valueArea: Value area percentageticksPerRow: Positive integer number of instrument ticks grouped into each fixed profile rowtickSize: Positive minimum price increment; defaults to the instrument contract increment
Outputs
| Field | Meaning |
|---|---|
poc | Point of control (price level with highest volume) |
vah | Value area high |
val | Value area low |
totalVolume | Total volume in the profile |
hvn | Highest-volume node in the profile |
lvn | Lowest-volume node in the profile |
nearestHvnAbove | Nearest high-volume node above price |
nearestHvnBelow | Nearest high-volume node below price |
nearestLvnAbove | Nearest low-volume node above price |
nearestLvnBelow | Nearest low-volume node below price |
distributionCount | Number of meaningful distributions |
balanceScore | Balanced/D-shape score |
trendScore | Trend/elongation score |
doubleDistributionScore | Double-distribution score |
profileShape | Numeric profile shape class: 0 unknown, 1 balanced/D, 2 P, 3 b, 4 double distribution, 5 trend |
Example expression
SVP().pocVP — 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
| Parameter | Default | Aliases |
|---|---|---|
lookback | 20 | — |
interval | "30" | — |
valueArea | 0.68 | — |
ticksPerRow | 8 | ticks_per_row |
tickSize | — | tick_size |
Parameter notes
lookback: Number of trailing bars to includeinterval: Bar interval used to build the rolling profilevalueArea: Value area percentageticksPerRow: Positive integer number of instrument ticks grouped into each fixed profile rowtickSize: Positive minimum price increment; defaults to the instrument contract increment
Outputs
| Field | Meaning |
|---|---|
poc | Point of control (price level with highest volume) |
vah | Value area high |
val | Value area low |
totalVolume | Total volume in the profile |
hvn | Highest-volume node in the profile |
lvn | Lowest-volume node in the profile |
nearestHvnAbove | Nearest high-volume node above price |
nearestHvnBelow | Nearest high-volume node below price |
nearestLvnAbove | Nearest low-volume node above price |
nearestLvnBelow | Nearest low-volume node below price |
distributionCount | Number of meaningful distributions |
balanceScore | Balanced/D-shape score |
trendScore | Trend/elongation score |
doubleDistributionScore | Double-distribution score |
profileShape | Numeric profile shape class: 0 unknown, 1 balanced/D, 2 P, 3 b, 4 double distribution, 5 trend |
Example expression
VP().pocAVP — 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
| Parameter | Default | Aliases |
|---|---|---|
anchor | — | — |
barsAgo | — | — |
dataInterval | "30" | — |
valueArea | 0.68 | — |
ticksPerRow | 8 | ticks_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 valuedataInterval: Bar interval used to build the profilevalueArea: Value area percentageticksPerRow: Positive integer number of instrument ticks grouped into each fixed profile rowtickSize: Positive minimum price increment; defaults to the instrument contract incrementinterval: Bar interval (e.g. ‘1m’, ‘1h’, ‘D’)
Outputs
| Field | Meaning |
|---|---|
poc | Point of control (price level with highest volume) |
vah | Value area high |
val | Value area low |
totalVolume | Total volume in the profile |
hvn | Highest-volume node in the profile |
lvn | Lowest-volume node in the profile |
nearestHvnAbove | Nearest high-volume node above price |
nearestHvnBelow | Nearest high-volume node below price |
nearestLvnAbove | Nearest low-volume node above price |
nearestLvnBelow | Nearest low-volume node below price |
distributionCount | Number of meaningful distributions |
balanceScore | Balanced/D-shape score |
trendScore | Trend/elongation score |
doubleDistributionScore | Double-distribution score |
profileShape | Numeric profile shape class: 0 unknown, 1 balanced/D, 2 P, 3 b, 4 double distribution, 5 trend |
Example expression
AVP().poc