Volume Indicators
14 functions.
pta.ad
Chaikin A/D Line
pta.ad(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), volume=pl.col("volume"))
TA-Lib name: AD
Inputs
| Input | Default |
|---|---|
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.ad().alias("ad"))
pta.adosc
Chaikin A/D Oscillator
pta.adosc(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), volume=pl.col("volume"), fast_period=3, slow_period=10)
TA-Lib name: ADOSC
Inputs
| Input | Default |
|---|---|
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
| Parameter | TA-Lib name | Type | Default | Range / values |
|---|---|---|---|---|
fast_period |
optInFastPeriod |
int | 3 | 2 .. 100000 |
slow_period |
optInSlowPeriod |
int | 10 | 2 .. 100000 |
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.adosc().alias("adosc"))
pta.cmf
Chaikin Money Flow
pta.cmf(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), volume=pl.col("volume"), time_period=20)
TA-Lib name: CMF
Inputs
| Input | Default |
|---|---|
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
| Parameter | TA-Lib name | Type | Default | Range / values |
|---|---|---|---|---|
time_period |
optInTimePeriod |
int | 20 | 2 .. 100000 |
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.cmf(time_period=20).alias("cmf"))
pta.efi
Elder's Force Index
pta.efi(close=pl.col("close"), volume=pl.col("volume"), time_period=13)
TA-Lib name: EFI
Inputs
| Input | Default |
|---|---|
close |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
| Parameter | TA-Lib name | Type | Default | Range / values |
|---|---|---|---|---|
time_period |
optInTimePeriod |
int | 13 | 1 .. 100000 |
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.efi(time_period=20).alias("efi"))
pta.emv
Arms Ease of Movement
pta.emv(high=pl.col("high"), low=pl.col("low"), volume=pl.col("volume"), time_period=14, volume_divisor=10000)
TA-Lib name: EMV
Inputs
| Input | Default |
|---|---|
high |
pl.col("high") |
low |
pl.col("low") |
volume |
pl.col("volume") |
Parameters
| Parameter | TA-Lib name | Type | Default | Range / values |
|---|---|---|---|---|
time_period |
optInTimePeriod |
int | 14 | 1 .. 100000 |
volume_divisor |
optInVolumeDivisor |
float | 10000 | 1 .. 3e+37 |
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.emv(time_period=20).alias("emv"))
pta.kvo
Klinger Volume Oscillator
pta.kvo(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), volume=pl.col("volume"), fast_period=34, slow_period=55, signal_period=13)
TA-Lib name: KVO
Inputs
| Input | Default |
|---|---|
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
| Parameter | TA-Lib name | Type | Default | Range / values |
|---|---|---|---|---|
fast_period |
optInFastPeriod |
int | 34 | 2 .. 100000 |
slow_period |
optInSlowPeriod |
int | 55 | 2 .. 100000 |
signal_period |
optInSignalPeriod |
int | 13 | 2 .. 100000 |
Outputs
| Field | dtype |
|---|---|
kvo |
Float64 |
kvo_signal |
Float64 |
Returned as a Struct.
Example
df.select(pta.kvo().alias("out")).unnest("out")
pta.marketfi
Market Facilitation Index
pta.marketfi(high=pl.col("high"), low=pl.col("low"), volume=pl.col("volume"))
TA-Lib name: MARKETFI
Inputs
| Input | Default |
|---|---|
high |
pl.col("high") |
low |
pl.col("low") |
volume |
pl.col("volume") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.marketfi().alias("marketfi"))
pta.nvi
Negative Volume Index
pta.nvi(close=pl.col("close"), volume=pl.col("volume"))
TA-Lib name: NVI
Inputs
| Input | Default |
|---|---|
close |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.nvi().alias("nvi"))
pta.obv
On Balance Volume
pta.obv(real=pl.col("close"), volume=pl.col("volume"))
TA-Lib name: OBV
Inputs
| Input | Default |
|---|---|
real |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.obv().alias("obv"))
pta.pvi
Positive Volume Index
pta.pvi(close=pl.col("close"), volume=pl.col("volume"))
TA-Lib name: PVI
Inputs
| Input | Default |
|---|---|
close |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.pvi().alias("pvi"))
pta.pvo
Percentage Volume Oscillator
pta.pvo(volume=pl.col("volume"), fast_period=12, slow_period=26, ma_type=1)
TA-Lib name: PVO
Inputs
| Input | Default |
|---|---|
volume |
pl.col("volume") |
Parameters
| Parameter | TA-Lib name | Type | Default | Range / values |
|---|---|---|---|---|
fast_period |
optInFastPeriod |
int | 12 | 2 .. 100000 |
slow_period |
optInSlowPeriod |
int | 26 | 2 .. 100000 |
ma_type |
optInMAType |
int or name | 1 | SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.pvo().alias("pvo"))
pta.pvt
Price Volume Trend
pta.pvt(close=pl.col("close"), volume=pl.col("volume"))
TA-Lib name: PVT
Inputs
| Input | Default |
|---|---|
close |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.pvt().alias("pvt"))
pta.rvol
Relative Volume
pta.rvol(volume=pl.col("volume"), time_period=20)
TA-Lib name: RVOL
Inputs
| Input | Default |
|---|---|
volume |
pl.col("volume") |
Parameters
| Parameter | TA-Lib name | Type | Default | Range / values |
|---|---|---|---|---|
time_period |
optInTimePeriod |
int | 20 | 1 .. 100000 |
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.rvol(time_period=20).alias("rvol"))
pta.vwap
Volume Weighted Average Price
pta.vwap(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), volume=pl.col("volume"))
TA-Lib name: VWAP
Inputs
| Input | Default |
|---|---|
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.vwap().alias("vwap"))