ta
Technical analysis (streaming, same maths as the built-in studies).
#Functions
#ta.almafunction
Arnaud Legoux moving average.
ta.alma(source: float, length: simple int, offset: simple float, sigma: simple float, { floor?: simple bool = false }): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
offset | simple float | Where the weights peak (0 = oldest, 1 = newest). |
sigma | simple float | The Gaussian width. |
floor | simple booldefault false | Round the offset down. |
Returns float.
Example
const a = ta.alma(close, 9, 0.85, 6)Since ChartScript 1
#ta.atrfunction
Average true range (RMA of the true range).
ta.atr(length: simple int): float| Parameter | Type | Description |
|---|---|---|
length | simple int | Number of bars. |
Returns float.
Example
const a = ta.atr(14)Since ChartScript 1
#ta.barssincefunction
Bars since the condition was last true (na before the first time).
ta.barssince(condition: bool): int| Parameter | Type | Description |
|---|---|---|
condition | bool | The condition. |
Returns int.
Example
const n = ta.barssince(close > open)Since ChartScript 1
#ta.bbfunction
Bollinger Bands: [middle, upper, lower].
ta.bb(source: float, length: simple int, mult: simple float): tuple<float,float,float>| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
mult | simple float | The multiplier of the standard deviation or range. |
Returns tuple<float,float,float>.
Example
const [mid, up, lo] = ta.bb(close, 20, 2)Since ChartScript 1
#ta.bbwfunction
Bollinger Band width.
ta.bbw(source: float, length: simple int, mult: simple float): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
mult | simple float | The multiplier of the standard deviation or range. |
Returns float.
Example
const w = ta.bbw(close, 20, 2)Since ChartScript 1
#ta.ccifunction
Commodity channel index.
ta.cci(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const c = ta.cci(hlc3, 20)Since ChartScript 1
#ta.changefunction
source minus source[length] (for bool: true when it changed).
ta.change(source: num, { length?: int = 1 }): numta.change(source: bool, { length?: int = 1 }): bool| Parameter | Type | Description |
|---|---|---|
source | num | The series to read. |
length | intdefault 1 | Number of bars. |
Returns num.
Example
const d = ta.change(close)Since ChartScript 1
#ta.cmofunction
Chande momentum oscillator.
ta.cmo(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const c = ta.cmo(close, 9)Since ChartScript 1
#ta.cogfunction
Center of gravity: -sum(source[i] * (i + 1)) / sum(source[i]) over length bars.
ta.cog(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const c = ta.cog(close, 10)Since ChartScript 1
#ta.correlationfunction
Correlation coefficient of two series.
ta.correlation(source1: float, source2: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source1 | float | The first series. |
source2 | float | The second series. |
length | simple int | Number of bars. |
Returns float.
Example
const c = ta.correlation(close, volume, 20)Since ChartScript 1
#ta.crossfunction
true when the two series cross in either direction on this bar.
ta.cross(source1: float, source2: float): bool| Parameter | Type | Description |
|---|---|---|
source1 | float | The first series. |
source2 | float | The second series. |
Returns bool.
Example
const x = ta.cross(close, ta.sma(close, 50))Since ChartScript 1
#ta.crossoverfunction
true when source1 crosses above source2 on this bar.
ta.crossover(source1: float, source2: float): bool| Parameter | Type | Description |
|---|---|---|
source1 | float | The first series. |
source2 | float | The second series. |
Returns bool.
Example
const up = ta.crossover(ta.ema(close, 9), ta.ema(close, 21))Since ChartScript 1
#ta.crossunderfunction
true when source1 crosses below source2 on this bar.
ta.crossunder(source1: float, source2: float): bool| Parameter | Type | Description |
|---|---|---|
source1 | float | The first series. |
source2 | float | The second series. |
Returns bool.
Example
const dn = ta.crossunder(close, ta.sma(close, 50))Since ChartScript 1
#ta.cumfunction
The running total.
ta.cum(source: float): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
Returns float.
Example
const c = ta.cum(volume)Since ChartScript 1
#ta.demafunction
Double EMA (ChartDeck extra).
ta.dema(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const d = ta.dema(close, 21)Since ChartScript 1
#ta.devfunction
Mean absolute deviation from the SMA.
ta.dev(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const d = ta.dev(close, 20)Since ChartScript 1
#ta.dmifunction
Directional movement: [+DI, -DI, ADX].
ta.dmi(diLength: simple int, adxSmoothing: simple int): tuple<float,float,float>| Parameter | Type | Description |
|---|---|---|
diLength | simple int | The DI length. |
adxSmoothing | simple int | The ADX smoothing length. |
Returns tuple<float,float,float>.
Example
const [plus, minus, adx] = ta.dmi(14, 14)Since ChartScript 1
#ta.emafunction
Exponential moving average, seeded with the SMA of the first length values ({ seed: "first" } seeds with the first value).
ta.ema(source: float, length: int, { seed?: simple string = "sma" }): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | int | Number of bars. |
seed | simple stringdefault "sma" | "sma" (default, as the built-in EMA study) or "first". |
Returns float.
Example
const e = ta.ema(close, 21)Since ChartScript 1
#ta.fallingfunction
true when the source fell on each of the last length bars.
ta.falling(source: float, length: simple int): bool| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns bool.
Example
const f = ta.falling(close, 3)Since ChartScript 1
#ta.heikin_ashifunction
Heikin-Ashi candle values (ChartDeck extra): [open, high, low, close].
ta.heikin_ashi(): tuple<float,float,float,float>Returns tuple<float,float,float,float>.
Example
const [hao, hah, hal, hac] = ta.heikin_ashi()Since ChartScript 1
#ta.highestfunction
The highest value over length bars (source defaults to high).
ta.highest(source?: float = high, length: int): float| Parameter | Type | Description |
|---|---|---|
source | floatdefault high | The series to read. |
length | int | Number of bars. |
Returns float.
Example
const hh = ta.highest(high, 20)Since ChartScript 1
#ta.highestbarsfunction
Offset (0 or negative) to the highest value over length bars.
ta.highestbars(source?: float = high, length: simple int): int| Parameter | Type | Description |
|---|---|---|
source | floatdefault high | The series to read. |
length | simple int | Number of bars. |
Returns int.
Example
const o = ta.highestbars(high, 20)Since ChartScript 1
#ta.hmafunction
Hull moving average.
ta.hma(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const h = ta.hma(close, 21)Since ChartScript 1
#ta.kamafunction
Kaufman adaptive moving average (ChartDeck extra).
ta.kama(source: float, length: simple int, { fastLength?: simple int = 2, slowLength?: simple int = 30 }): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
fastLength | simple intdefault 2 | The fast length. |
slowLength | simple intdefault 30 | The slow length. |
Returns float.
Example
const k = ta.kama(close, 10)Since ChartScript 1
#ta.kcfunction
Keltner Channels: [middle, upper, lower].
ta.kc(source: float, length: simple int, mult: simple float, { useTrueRange?: simple bool = true }): tuple<float,float,float>| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
mult | simple float | The multiplier of the standard deviation or range. |
useTrueRange | simple booldefault true | true: the true range; false: high - low. |
Returns tuple<float,float,float>.
Example
const [mid, up, lo] = ta.kc(close, 20, 1.5)Since ChartScript 1
#ta.kcwfunction
Keltner Channel width.
ta.kcw(source: float, length: simple int, mult: simple float, { useTrueRange?: simple bool = true }): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
mult | simple float | The multiplier of the standard deviation or range. |
useTrueRange | simple booldefault true | true: the true range; false: high - low. |
Returns float.
Example
const w = ta.kcw(close, 20, 1.5)Since ChartScript 1
#ta.linregfunction
Linear regression value at offset bars back from the end of the line.
ta.linreg(source: float, length: simple int, offset: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
offset | simple int | Shift the output this many bars to the right (negative: left). |
Returns float.
Example
const l = ta.linreg(close, 20, 0)Since ChartScript 1
#ta.lowestfunction
The lowest value over length bars (source defaults to low).
ta.lowest(source?: float = low, length: int): float| Parameter | Type | Description |
|---|---|---|
source | floatdefault low | The series to read. |
length | int | Number of bars. |
Returns float.
Example
const ll = ta.lowest(low, 20)Since ChartScript 1
#ta.lowestbarsfunction
Offset (0 or negative) to the lowest value over length bars.
ta.lowestbars(source?: float = low, length: simple int): int| Parameter | Type | Description |
|---|---|---|
source | floatdefault low | The series to read. |
length | simple int | Number of bars. |
Returns int.
Example
const o = ta.lowestbars(low, 20)Since ChartScript 1
#ta.mafunction
A moving average of one of the 11 ChartDeck types (ChartDeck extra).
ta.ma(type: simple string, source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
type | simple string | The moving-average type (one of the 11 ChartDeck types). |
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const m = ta.ma("hma", close, 21)Since ChartScript 1
#ta.macdfunction
MACD: [macd line, signal, histogram].
ta.macd(source: float, fastlen: simple int, slowlen: simple int, siglen: simple int): tuple<float,float,float>| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
fastlen | simple int | Fast length. |
slowlen | simple int | Slow length. |
siglen | simple int | Signal length. |
Returns tuple<float,float,float>.
Example
const [m, s, h] = ta.macd(close, 12, 26, 9)Since ChartScript 1
#ta.maxfunction
The highest value of the source over all bars so far.
ta.max(source: float): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
Returns float.
Example
const m = ta.max(high)Since ChartScript 1
#ta.medianfunction
Median over length bars.
ta.median(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const m = ta.median(close, 20)Since ChartScript 1
#ta.mfifunction
Money flow index.
ta.mfi(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const m = ta.mfi(hlc3, 14)Since ChartScript 1
#ta.minfunction
The lowest value of the source over all bars so far.
ta.min(source: float): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
Returns float.
Example
const m = ta.min(low)Since ChartScript 1
#ta.modefunction
The most frequent value over length bars (the smallest on a tie).
ta.mode(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const m = ta.mode(close, 20)Since ChartScript 1
#ta.momfunction
Momentum: source - source[length].
ta.mom(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const m = ta.mom(close, 10)Since ChartScript 1
#ta.percentile_linear_interpolationfunction
Percentile by linear interpolation.
ta.percentile_linear_interpolation(source: float, length: simple int, percentage: simple float): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
percentage | simple float | A percentage from 0 to 100. |
Returns float.
Example
const p = ta.percentile_linear_interpolation(close, 50, 90)Since ChartScript 1
#ta.percentile_nearest_rankfunction
Percentile by the nearest-rank method.
ta.percentile_nearest_rank(source: float, length: simple int, percentage: simple float): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
percentage | simple float | A percentage from 0 to 100. |
Returns float.
Example
const p = ta.percentile_nearest_rank(close, 50, 90)Since ChartScript 1
#ta.percentrankfunction
Percent of the previous length values that are at or below the current one.
ta.percentrank(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const p = ta.percentrank(close, 50)Since ChartScript 1
#ta.pivot_point_levelsfunction
Pivot point levels [P, R1, S1, R2, S2, R3, S3, R4, S4, R5, S5] from the previous period (a new period starts where anchor is true); levels a type does not define are na.
ta.pivot_point_levels(type: simple string, anchor: bool, { developing?: simple bool = false }): array<float>| Parameter | Type | Description |
|---|---|---|
type | simple string | "Traditional", "Fibonacci", "Woodie", "Classic", "DM" or "Camarilla". |
anchor | bool | Restart the calculation on bars where this is true. |
developing | simple booldefault false | true: from the period so far instead of the previous one. |
Returns array<float>.
Example
const lv = ta.pivot_point_levels("Traditional", timeframe.change("1D"))Since ChartScript 1
#ta.pivothighfunction
The pivot high price, reported rightbars bars after the pivot (else na).
ta.pivothigh(source?: float = high, leftbars: simple int, rightbars: simple int): float| Parameter | Type | Description |
|---|---|---|
source | floatdefault high | The series to read. |
leftbars | simple int | Bars to the left that must be lower (higher). |
rightbars | simple int | Bars to the right that must be lower (higher); the pivot is reported this many bars late. |
Returns float.
Example
const ph = ta.pivothigh(high, 5, 5)Since ChartScript 1
#ta.pivotlowfunction
The pivot low price, reported rightbars bars after the pivot (else na).
ta.pivotlow(source?: float = low, leftbars: simple int, rightbars: simple int): float| Parameter | Type | Description |
|---|---|---|
source | floatdefault low | The series to read. |
leftbars | simple int | Bars to the left that must be lower (higher). |
rightbars | simple int | Bars to the right that must be lower (higher); the pivot is reported this many bars late. |
Returns float.
Example
const pl = ta.pivotlow(low, 5, 5)Since ChartScript 1
#ta.rangefunction
Highest minus lowest over length bars.
ta.range(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const r = ta.range(close, 20)Since ChartScript 1
#ta.rcifunction
Rank correlation index (Spearman, in percent): how closely the last length values rise with time.
ta.rci(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const r = ta.rci(close, 10)Since ChartScript 1
#ta.risingfunction
true when the source rose on each of the last length bars.
ta.rising(source: float, length: simple int): bool| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns bool.
Example
const r = ta.rising(close, 3)Since ChartScript 1
#ta.rmafunction
Wilder's moving average (RMA), seeded with the SMA.
ta.rma(source: float, length: int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | int | Number of bars. |
Returns float.
Example
const r = ta.rma(close, 14)Since ChartScript 1
#ta.rocfunction
Rate of change in percent.
ta.roc(source: float, length: int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | int | Number of bars. |
Returns float.
Example
const r = ta.roc(close, 10)Since ChartScript 1
#ta.rsifunction
Relative strength index (Wilder).
ta.rsi(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const r = ta.rsi(close, 14)Since ChartScript 1
#ta.sarfunction
Parabolic SAR.
ta.sar(start: simple float, inc: simple float, max: simple float): float| Parameter | Type | Description |
|---|---|---|
start | simple float | The start acceleration. |
inc | simple float | The increment. |
max | simple float | The largest value. |
Returns float.
Example
const s = ta.sar(0.02, 0.02, 0.2)Since ChartScript 1
#ta.smafunction
Simple moving average.
ta.sma(source: float, length: int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | int | Number of bars. |
Returns float.
Example
const m = ta.sma(close, 20)Since ChartScript 1
#ta.squeezefunction
Squeeze momentum (ChartDeck extra): [momentum, state] with state 1 = squeeze on, -1 = released, 0 = neither.
ta.squeeze({ bbLength?: simple int = 20, bbMult?: simple float = 2, kcLength?: simple int = 20, kcMult?: simple float = 1.5 }): tuple<float,int>| Parameter | Type | Description |
|---|---|---|
bbLength | simple intdefault 20 | Bollinger length. |
bbMult | simple floatdefault 2 | Bollinger multiplier. |
kcLength | simple intdefault 20 | Keltner length. |
kcMult | simple floatdefault 1.5 | Keltner multiplier. |
Returns tuple<float,int>.
Example
const [mom, sqz] = ta.squeeze()Since ChartScript 1
#ta.stdevfunction
Standard deviation over length bars.
ta.stdev(source: float, length: int, { biased?: simple bool = true }): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | int | Number of bars. |
biased | simple booldefault true | true: divide by n; false: divide by n - 1. |
Returns float.
Example
const s = ta.stdev(close, 20)Since ChartScript 1
#ta.stochfunction
Raw stochastic %K.
ta.stoch(source: float, high: float, low: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
high | float | The high value. |
low | float | The low value. |
length | simple int | Number of bars. |
Returns float.
Example
const k = ta.stoch(close, high, low, 14)Since ChartScript 1
#ta.supertrendfunction
Supertrend: [line, direction] (direction -1 = up trend, 1 = down trend).
ta.supertrend(factor: simple float, atrPeriod: simple int): tuple<float,int>| Parameter | Type | Description |
|---|---|---|
factor | simple float | The ATR multiplier. |
atrPeriod | simple int | The ATR length. |
Returns tuple<float,int>.
Example
const [st, dir] = ta.supertrend(3, 10)Since ChartScript 1
#ta.swmafunction
Symmetrically weighted moving average over 4 bars.
ta.swma(source: float): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
Returns float.
Example
const s = ta.swma(close)Since ChartScript 1
#ta.temafunction
Triple EMA (ChartDeck extra).
ta.tema(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const t = ta.tema(close, 21)Since ChartScript 1
#ta.trfunction
The true range: max(high - low, |high - close[1]|, |low - close[1]|). The true range; { handle_na: true } uses high - low on the first bar.
ta.tr({ handle_na?: simple bool = false }): float| Parameter | Type | Description |
|---|---|---|
handle_na | simple booldefault false | true: use high - low on the first bar instead of na. |
Returns float.
Example
const t = ta.tr(true)Since ChartScript 1
#ta.tsifunction
True strength index.
ta.tsi(source: float, short_length: simple int, long_length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
short_length | simple int | The short length. |
long_length | simple int | The long length. |
Returns float.
Example
const t = ta.tsi(close, 13, 25)Since ChartScript 1
#ta.valuewhenfunction
The source value on the bar where the condition was true (occurrence 0 = the latest).
ta.valuewhen(condition: bool, source: T, occurrence: simple int): T| Parameter | Type | Description |
|---|---|---|
condition | bool | The condition. |
source | T | The series to read. |
occurrence | simple int | Which occurrence: 0 = the latest. |
Returns T.
Example
const v = ta.valuewhen(close > open, close, 0)Since ChartScript 1
#ta.variancefunction
Variance over length bars.
ta.variance(source: float, length: simple int, { biased?: simple bool = true }): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
biased | simple booldefault true | true: divide by n; false: divide by n - 1. |
Returns float.
Example
const v = ta.variance(close, 20)Since ChartScript 1
#ta.vwapfunction
The volume-weighted average price of hlc3, restarting each UTC day. Volume-weighted average price (restarts each UTC day, or where anchor is true); with stdev_mult: [vwap, upper, lower].
ta.vwap(source: float): floatta.vwap(source: float, anchor: bool): floatta.vwap(source: float, anchor: bool, stdev_mult: simple float): tuple<float,float,float>| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
anchor | bool | Restart the calculation on bars where this is true. |
stdev_mult | simple float | The band width in standard deviations. |
Returns float.
Example
const v = ta.vwap(hlc3)Since ChartScript 1
#ta.vwmafunction
Volume-weighted moving average.
ta.vwma(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const v = ta.vwma(close, 20)Since ChartScript 1
#ta.wavetrendfunction
WaveTrend oscillator (ChartDeck extra): [wt1, wt2].
ta.wavetrend({ channelLength?: simple int = 10, averageLength?: simple int = 21, signalLength?: simple int = 4 }): tuple<float,float>| Parameter | Type | Description |
|---|---|---|
channelLength | simple intdefault 10 | The channel length. |
averageLength | simple intdefault 21 | The average length. |
signalLength | simple intdefault 4 | The signal length. |
Returns tuple<float,float>.
Example
const [wt1, wt2] = ta.wavetrend()Since ChartScript 1
#ta.wmafunction
Linearly weighted moving average.
ta.wma(source: float, length: int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | int | Number of bars. |
Returns float.
Example
const w = ta.wma(close, 10)Since ChartScript 1
#ta.wprfunction
Williams %R.
ta.wpr(length: simple int): float| Parameter | Type | Description |
|---|---|---|
length | simple int | Number of bars. |
Returns float.
Example
const w = ta.wpr(14)Since ChartScript 1
#ta.zlemafunction
Zero-lag EMA (ChartDeck extra).
ta.zlema(source: float, length: simple int): float| Parameter | Type | Description |
|---|---|---|
source | float | The series to read. |
length | simple int | Number of bars. |
Returns float.
Example
const z = ta.zlema(close, 21)Since ChartScript 1
#Variables
#ta.accdistvariable
Accumulation/distribution: the running total of ((close - low) - (high - close)) / (high - low) * volume.
ta.accdist: floatType series float.
Example
const v = ta.accdistSince ChartScript 1
#ta.iiivariable
Intraday intensity index: (2 * close - high - low) / ((high - low) * volume).
ta.iii: floatType series float.
Example
const v = ta.iiiSince ChartScript 1
#ta.nvivariable
Negative volume index (starts at 1; moves with the close only on bars whose volume fell).
ta.nvi: floatType series float.
Example
const v = ta.nviSince ChartScript 1
#ta.obvvariable
On-balance volume.
ta.obv: floatType series float.
Example
const v = ta.obvSince ChartScript 1
#ta.pvivariable
Positive volume index (starts at 1; moves with the close only on bars whose volume rose).
ta.pvi: floatType series float.
Example
const v = ta.pviSince ChartScript 1
#ta.pvtvariable
Price-volume trend: the running total of the close change in percent of the previous close times volume.
ta.pvt: floatType series float.
Example
const v = ta.pvtSince ChartScript 1
#ta.trvariable
The true range: max(high - low, |high - close[1]|, |low - close[1]|). The true range; { handle_na: true } uses high - low on the first bar.
ta.tr({ handle_na?: simple bool = false }): floatType series float.
Example
const v = ta.trSince ChartScript 1
#ta.vwapvariable
The volume-weighted average price of hlc3, restarting each UTC day. Volume-weighted average price (restarts each UTC day, or where anchor is true); with stdev_mult: [vwap, upper, lower].
ta.vwap(source: float): floatta.vwap(source: float, anchor: bool): floatta.vwap(source: float, anchor: bool, stdev_mult: simple float): tuple<float,float,float>Type series float.
Example
const v = ta.vwapSince ChartScript 1
#ta.wadvariable
Williams accumulation/distribution (running total).
ta.wad: floatType series float.
Example
const v = ta.wadSince ChartScript 1
#ta.wvadvariable
Williams variable accumulation/distribution: (close - open) / (high - low) * volume.
ta.wvad: floatType series float.
Example
const v = ta.wvadSince ChartScript 1
#Not available yet
#ta.fvgfunction
Not available yet.
ta.fvg (later version).
Since ChartScript 1
#ta.swingsfunction
Not available yet.
ta.swings (later version).
Since ChartScript 1