Momentum Indicators
Back to API overview
63 functions.
pta.ac
Accelerator/Decelerator Oscillator
pta.ac(high=pl.col("high"), low=pl.col("low"), fast_period=5, slow_period=34, signal_period=5)
TA-Lib name: AC
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
fast_period |
optInFastPeriod |
int |
5 |
2 .. 100000 |
slow_period |
optInSlowPeriod |
int |
34 |
2 .. 100000 |
signal_period |
optInSignalPeriod |
int |
5 |
2 .. 100000 |
Outputs
Example
df.select(pta.ac().alias("ac"))
pta.adx
Average Directional Movement Index
pta.adx(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=14)
TA-Lib name: ADX
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.adx(time_period=20).alias("adx"))
pta.adxr
Average Directional Movement Index Rating
pta.adxr(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=14)
TA-Lib name: ADXR
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.adxr(time_period=20).alias("adxr"))
pta.ao
Awesome Oscillator
pta.ao(high=pl.col("high"), low=pl.col("low"), fast_period=5, slow_period=34)
TA-Lib name: AO
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
fast_period |
optInFastPeriod |
int |
5 |
2 .. 100000 |
slow_period |
optInSlowPeriod |
int |
34 |
2 .. 100000 |
Outputs
Example
df.select(pta.ao().alias("ao"))
pta.apo
Absolute Price Oscillator
pta.apo(real=pl.col("close"), fast_period=12, slow_period=26, ma_type=1)
TA-Lib name: APO
| Input |
Default |
real |
pl.col("close") |
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
Example
df.select(pta.apo().alias("apo"))
pta.aroon
Aroon
pta.aroon(high=pl.col("high"), low=pl.col("low"), time_period=14)
TA-Lib name: AROON
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
| Field |
dtype |
aroon_down |
Float64 |
aroon_up |
Float64 |
Returned as a Struct.
Example
df.select(pta.aroon(time_period=20).alias("out")).unnest("out")
pta.aroonosc
Aroon Oscillator
pta.aroonosc(high=pl.col("high"), low=pl.col("low"), time_period=14)
TA-Lib name: AROONOSC
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.aroonosc(time_period=20).alias("aroonosc"))
pta.asi
Wilder Accumulative Swing Index
pta.asi(open=pl.col("open"), high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), limit_move=3)
TA-Lib name: ASI
| Input |
Default |
open |
pl.col("open") |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
limit_move |
optInLimitMove |
float |
3 |
1e-08 .. 3e+37 |
Outputs
Example
df.select(pta.asi().alias("asi"))
pta.bop
Balance Of Power
pta.bop(open=pl.col("open"), high=pl.col("high"), low=pl.col("low"), close=pl.col("close"))
TA-Lib name: BOP
| Input |
Default |
open |
pl.col("open") |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
None.
Outputs
Example
df.select(pta.bop().alias("bop"))
pta.cci
Commodity Channel Index
pta.cci(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=14)
TA-Lib name: CCI
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.cci(time_period=20).alias("cci"))
pta.cg
Center of Gravity Oscillator
pta.cg(real=pl.col("close"), time_period=10)
TA-Lib name: CG
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
10 |
2 .. 100000 |
Outputs
Example
df.select(pta.cg(time_period=20).alias("cg"))
pta.chop
Choppiness Index
pta.chop(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=14)
TA-Lib name: CHOP
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.chop(time_period=20).alias("chop"))
pta.choptr
Choppiness Index (True Range Box)
pta.choptr(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=14)
TA-Lib name: CHOPTR
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.choptr(time_period=20).alias("choptr"))
pta.cmo
Chande Momentum Oscillator
pta.cmo(real=pl.col("close"), time_period=14)
TA-Lib name: CMO
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.cmo(time_period=20).alias("cmo"))
pta.cmou
Chande Momentum Oscillator (Unsmoothed)
pta.cmou(real=pl.col("close"), time_period=14)
TA-Lib name: CMOU
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.cmou(time_period=20).alias("cmou"))
pta.coppock
Coppock Curve
pta.coppock(real=pl.col("close"), wma_period=10, roc1_period=11, roc2_period=14)
TA-Lib name: COPPOCK
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
wma_period |
optInWMAPeriod |
int |
10 |
1 .. 100000 |
roc1_period |
optInROC1Period |
int |
11 |
1 .. 100000 |
roc2_period |
optInROC2Period |
int |
14 |
1 .. 100000 |
Outputs
Example
df.select(pta.coppock().alias("coppock"))
pta.crsi
Connors Relative Strength Index
pta.crsi(real=pl.col("close"), time_period=3, streak_period=2, rank_period=100)
TA-Lib name: CRSI
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
3 |
2 .. 100000 |
streak_period |
optInStreakPeriod |
int |
2 |
2 .. 100000 |
rank_period |
optInRankPeriod |
int |
100 |
2 .. 10000 |
Outputs
Example
df.select(pta.crsi(time_period=20).alias("crsi"))
pta.cti
Correlation Trend Indicator
pta.cti(real=pl.col("close"), time_period=20)
TA-Lib name: CTI
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
20 |
2 .. 100000 |
Outputs
Example
df.select(pta.cti(time_period=20).alias("cti"))
pta.dosc
Derivative Oscillator
pta.dosc(real=pl.col("close"), time_period=14, first_period=5, second_period=3, signal_period=9)
TA-Lib name: DOSC
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
first_period |
optInFirstPeriod |
int |
5 |
2 .. 100000 |
second_period |
optInSecondPeriod |
int |
3 |
2 .. 100000 |
signal_period |
optInSignalPeriod |
int |
9 |
2 .. 100000 |
Outputs
Example
df.select(pta.dosc(time_period=20).alias("dosc"))
pta.dpo
Detrended Price Oscillator
pta.dpo(real=pl.col("close"), time_period=20)
TA-Lib name: DPO
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
20 |
2 .. 100000 |
Outputs
Example
df.select(pta.dpo(time_period=20).alias("dpo"))
pta.dx
Directional Movement Index
pta.dx(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=14)
TA-Lib name: DX
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.dx(time_period=20).alias("dx"))
pta.er
Kaufman Efficiency Ratio
pta.er(real=pl.col("close"), time_period=10)
TA-Lib name: ER
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
10 |
2 .. 100000 |
Outputs
Example
df.select(pta.er(time_period=20).alias("er"))
pta.eri
Elder Ray Index (Bull Power / Bear Power)
pta.eri(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=13)
TA-Lib name: ERI
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
13 |
1 .. 100000 |
Outputs
| Field |
dtype |
bull_power |
Float64 |
bear_power |
Float64 |
Returned as a Struct.
Example
df.select(pta.eri(time_period=20).alias("out")).unnest("out")
pta.fisher
Fisher Transform
pta.fisher(high=pl.col("high"), low=pl.col("low"), time_period=10)
TA-Lib name: FISHER
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
10 |
2 .. 100000 |
Outputs
| Field |
dtype |
fisher |
Float64 |
trigger |
Float64 |
Returned as a Struct.
Example
df.select(pta.fisher(time_period=20).alias("out")).unnest("out")
pta.fosc
Forecast Oscillator
pta.fosc(real=pl.col("close"), time_period=5)
TA-Lib name: FOSC
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
5 |
2 .. 100000 |
Outputs
Example
df.select(pta.fosc(time_period=20).alias("fosc"))
pta.fractal
Williams Fractal
pta.fractal(high=pl.col("high"), low=pl.col("low"), left_bars=2, right_bars=2)
TA-Lib name: FRACTAL
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
left_bars |
optInLeftBars |
int |
2 |
1 .. 100000 |
right_bars |
optInRightBars |
int |
2 |
1 .. 100000 |
Outputs
| Field |
dtype |
swing_high |
Int32 |
swing_low |
Int32 |
Returned as a Struct.
Example
df.select(pta.fractal().alias("out")).unnest("out")
pta.ibs
Internal Bar Strength
pta.ibs(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"))
TA-Lib name: IBS
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
None.
Outputs
Example
df.select(pta.ibs().alias("ibs"))
pta.imi
Intraday Momentum Index
pta.imi(open=pl.col("open"), close=pl.col("close"), time_period=14)
TA-Lib name: IMI
| Input |
Default |
open |
pl.col("open") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.imi(time_period=20).alias("imi"))
pta.kdj
KDJ Stochastic
pta.kdj(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), fast_k_period=9, slow_k_period=3, slow_k_ma_type=13, slow_d_period=3, slow_d_ma_type=13)
TA-Lib name: KDJ
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
fast_k_period |
optInFastK_Period |
int |
9 |
1 .. 100000 |
slow_k_period |
optInSlowK_Period |
int |
3 |
1 .. 100000 |
slow_k_ma_type |
optInSlowK_MAType |
int or name |
13 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
slow_d_period |
optInSlowD_Period |
int |
3 |
1 .. 100000 |
slow_d_ma_type |
optInSlowD_MAType |
int or name |
13 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
Outputs
| Field |
dtype |
k |
Float64 |
d |
Float64 |
j |
Float64 |
Returned as a Struct.
Example
df.select(pta.kdj().alias("out")).unnest("out")
pta.kst
Know Sure Thing (Pring)
pta.kst(real=pl.col("close"), roc1_period=10, roc2_period=15, roc3_period=20, roc4_period=30, sma1_period=10, sma2_period=10, sma3_period=10, sma4_period=15, signal_period=9)
TA-Lib name: KST
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
roc1_period |
optInROC1Period |
int |
10 |
1 .. 100000 |
roc2_period |
optInROC2Period |
int |
15 |
1 .. 100000 |
roc3_period |
optInROC3Period |
int |
20 |
1 .. 100000 |
roc4_period |
optInROC4Period |
int |
30 |
1 .. 100000 |
sma1_period |
optInSMA1Period |
int |
10 |
1 .. 100000 |
sma2_period |
optInSMA2Period |
int |
10 |
1 .. 100000 |
sma3_period |
optInSMA3Period |
int |
10 |
1 .. 100000 |
sma4_period |
optInSMA4Period |
int |
15 |
1 .. 100000 |
signal_period |
optInSignalPeriod |
int |
9 |
1 .. 100000 |
Outputs
| Field |
dtype |
kst |
Float64 |
kst_signal |
Float64 |
Returned as a Struct.
Example
df.select(pta.kst().alias("out")).unnest("out")
pta.kstext
Know Sure Thing with controllable MA type
pta.kstext(real=pl.col("close"), roc1_period=10, roc2_period=15, roc3_period=20, roc4_period=30, ma1_period=10, ma2_period=10, ma3_period=10, ma4_period=15, signal_period=9, rocma_type=0, signal_ma_type=0)
TA-Lib name: KSTEXT
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
roc1_period |
optInROC1Period |
int |
10 |
1 .. 100000 |
roc2_period |
optInROC2Period |
int |
15 |
1 .. 100000 |
roc3_period |
optInROC3Period |
int |
20 |
1 .. 100000 |
roc4_period |
optInROC4Period |
int |
30 |
1 .. 100000 |
ma1_period |
optInMA1Period |
int |
10 |
1 .. 100000 |
ma2_period |
optInMA2Period |
int |
10 |
1 .. 100000 |
ma3_period |
optInMA3Period |
int |
10 |
1 .. 100000 |
ma4_period |
optInMA4Period |
int |
15 |
1 .. 100000 |
signal_period |
optInSignalPeriod |
int |
9 |
1 .. 100000 |
rocma_type |
optInROCMAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
signal_ma_type |
optInSignalMAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
Outputs
| Field |
dtype |
kst |
Float64 |
kst_signal |
Float64 |
Returned as a Struct.
Example
df.select(pta.kstext().alias("out")).unnest("out")
pta.macd
Moving Average Convergence/Divergence
pta.macd(real=pl.col("close"), fast_period=12, slow_period=26, signal_period=9)
TA-Lib name: MACD
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
fast_period |
optInFastPeriod |
int |
12 |
2 .. 100000 |
slow_period |
optInSlowPeriod |
int |
26 |
2 .. 100000 |
signal_period |
optInSignalPeriod |
int |
9 |
1 .. 100000 |
Outputs
| Field |
dtype |
macd |
Float64 |
macd_signal |
Float64 |
macd_hist |
Float64 |
Returned as a Struct.
Example
df.select(pta.macd().alias("out")).unnest("out")
pta.macdext
MACD with controllable MA type
pta.macdext(real=pl.col("close"), fast_period=12, fast_ma_type=0, slow_period=26, slow_ma_type=0, signal_period=9, signal_ma_type=0)
TA-Lib name: MACDEXT
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
fast_period |
optInFastPeriod |
int |
12 |
2 .. 100000 |
fast_ma_type |
optInFastMAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
slow_period |
optInSlowPeriod |
int |
26 |
2 .. 100000 |
slow_ma_type |
optInSlowMAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
signal_period |
optInSignalPeriod |
int |
9 |
1 .. 100000 |
signal_ma_type |
optInSignalMAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
Outputs
| Field |
dtype |
macd |
Float64 |
macd_signal |
Float64 |
macd_hist |
Float64 |
Returned as a Struct.
Example
df.select(pta.macdext().alias("out")).unnest("out")
pta.macdfix
Moving Average Convergence/Divergence Fix 12/26
pta.macdfix(real=pl.col("close"), signal_period=9)
TA-Lib name: MACDFIX
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
signal_period |
optInSignalPeriod |
int |
9 |
1 .. 100000 |
Outputs
| Field |
dtype |
macd |
Float64 |
macd_signal |
Float64 |
macd_hist |
Float64 |
Returned as a Struct.
Example
df.select(pta.macdfix().alias("out")).unnest("out")
pta.mfi
Money Flow Index
pta.mfi(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), volume=pl.col("volume"), time_period=14)
TA-Lib name: MFI
| 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 |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.mfi(time_period=20).alias("mfi"))
pta.minus_di
Minus Directional Indicator
pta.minus_di(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=14)
TA-Lib name: MINUS_DI
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
1 .. 100000 |
Outputs
Example
df.select(pta.minus_di(time_period=20).alias("minus_di"))
pta.minus_dm
Minus Directional Movement
pta.minus_dm(high=pl.col("high"), low=pl.col("low"), time_period=14)
TA-Lib name: MINUS_DM
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
1 .. 100000 |
Outputs
Example
df.select(pta.minus_dm(time_period=20).alias("minus_dm"))
pta.mom
Momentum
pta.mom(real=pl.col("close"), time_period=10)
TA-Lib name: MOM
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
10 |
1 .. 100000 |
Outputs
Example
df.select(pta.mom(time_period=20).alias("mom"))
pta.plus_di
Plus Directional Indicator
pta.plus_di(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=14)
TA-Lib name: PLUS_DI
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
1 .. 100000 |
Outputs
Example
df.select(pta.plus_di(time_period=20).alias("plus_di"))
pta.plus_dm
Plus Directional Movement
pta.plus_dm(high=pl.col("high"), low=pl.col("low"), time_period=14)
TA-Lib name: PLUS_DM
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
1 .. 100000 |
Outputs
Example
df.select(pta.plus_dm(time_period=20).alias("plus_dm"))
pta.ppo
Percentage Price Oscillator
pta.ppo(real=pl.col("close"), fast_period=12, slow_period=26, ma_type=1)
TA-Lib name: PPO
| Input |
Default |
real |
pl.col("close") |
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
Example
df.select(pta.ppo().alias("ppo"))
pta.pso
Premier Stochastic Oscillator
pta.pso(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), fast_k_period=8, ema_period=5)
TA-Lib name: PSO
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
fast_k_period |
optInFastK_Period |
int |
8 |
1 .. 100000 |
ema_period |
optInEMAPeriod |
int |
5 |
1 .. 100000 |
Outputs
Example
df.select(pta.pso().alias("pso"))
pta.qstick
Qstick
pta.qstick(open=pl.col("open"), close=pl.col("close"), time_period=10)
TA-Lib name: QSTICK
| Input |
Default |
open |
pl.col("open") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
10 |
1 .. 100000 |
Outputs
Example
df.select(pta.qstick(time_period=20).alias("qstick"))
pta.roc
Rate of change : ((price/prevPrice)-1)*100
pta.roc(real=pl.col("close"), time_period=10)
TA-Lib name: ROC
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
10 |
1 .. 100000 |
Outputs
Example
df.select(pta.roc(time_period=20).alias("roc"))
pta.rocp
Rate of change Percentage: (price-prevPrice)/prevPrice
pta.rocp(real=pl.col("close"), time_period=10)
TA-Lib name: ROCP
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
10 |
1 .. 100000 |
Outputs
Example
df.select(pta.rocp(time_period=20).alias("rocp"))
pta.rocr
Rate of change ratio: (price/prevPrice)
pta.rocr(real=pl.col("close"), time_period=10)
TA-Lib name: ROCR
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
10 |
1 .. 100000 |
Outputs
Example
df.select(pta.rocr(time_period=20).alias("rocr"))
pta.rocr100
Rate of change ratio 100 scale: (price/prevPrice)*100
pta.rocr100(real=pl.col("close"), time_period=10)
TA-Lib name: ROCR100
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
10 |
1 .. 100000 |
Outputs
Example
df.select(pta.rocr100(time_period=20).alias("rocr100"))
pta.rsi
Relative Strength Index
pta.rsi(real=pl.col("close"), time_period=14)
TA-Lib name: RSI
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.rsi(time_period=20).alias("rsi"))
pta.si
Wilder Swing Index
pta.si(open=pl.col("open"), high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), limit_move=3)
TA-Lib name: SI
| Input |
Default |
open |
pl.col("open") |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
limit_move |
optInLimitMove |
float |
3 |
1e-08 .. 3e+37 |
Outputs
Example
df.select(pta.si().alias("si"))
pta.smi
Stochastic Momentum Index
pta.smi(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=13, fast_period=2, slow_period=25, signal_period=9)
TA-Lib name: SMI
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
13 |
2 .. 100000 |
fast_period |
optInFastPeriod |
int |
2 |
2 .. 100000 |
slow_period |
optInSlowPeriod |
int |
25 |
2 .. 100000 |
signal_period |
optInSignalPeriod |
int |
9 |
2 .. 100000 |
Outputs
| Field |
dtype |
smi |
Float64 |
smi_signal |
Float64 |
Returned as a Struct.
Example
df.select(pta.smi(time_period=20).alias("out")).unnest("out")
pta.sqzmom
Squeeze Momentum and Level
pta.sqzmom(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), bb_period=20, nb_dev=2, kc_period=20, factor_wide=2, factor_normal=1.5, factor_narrow=1)
TA-Lib name: SQZMOM
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
bb_period |
optInBBPeriod |
int |
20 |
2 .. 100000 |
nb_dev |
optInNbDev |
float |
2 |
0 .. 3e+37 |
kc_period |
optInKCPeriod |
int |
20 |
2 .. 100000 |
factor_wide |
optInFactorWide |
float |
2 |
0 .. 3e+37 |
factor_normal |
optInFactorNormal |
float |
1.5 |
0 .. 3e+37 |
factor_narrow |
optInFactorNarrow |
float |
1 |
0 .. 3e+37 |
Outputs
| Field |
dtype |
momentum |
Float64 |
squeeze |
Int32 |
Returned as a Struct.
Example
df.select(pta.sqzmom().alias("out")).unnest("out")
pta.stc
Schaff Trend Cycle
pta.stc(real=pl.col("close"), fast_period=23, slow_period=50, cycle_period=10)
TA-Lib name: STC
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
fast_period |
optInFastPeriod |
int |
23 |
2 .. 100000 |
slow_period |
optInSlowPeriod |
int |
50 |
2 .. 100000 |
cycle_period |
optInCyclePeriod |
int |
10 |
2 .. 100000 |
Outputs
Example
df.select(pta.stc().alias("stc"))
pta.stoch
Stochastic
pta.stoch(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), fast_k_period=5, slow_k_period=3, slow_k_ma_type=0, slow_d_period=3, slow_d_ma_type=0)
TA-Lib name: STOCH
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
fast_k_period |
optInFastK_Period |
int |
5 |
1 .. 100000 |
slow_k_period |
optInSlowK_Period |
int |
3 |
1 .. 100000 |
slow_k_ma_type |
optInSlowK_MAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
slow_d_period |
optInSlowD_Period |
int |
3 |
1 .. 100000 |
slow_d_ma_type |
optInSlowD_MAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
Outputs
| Field |
dtype |
slow_k |
Float64 |
slow_d |
Float64 |
Returned as a Struct.
Example
df.select(pta.stoch().alias("out")).unnest("out")
pta.stochf
Stochastic Fast
pta.stochf(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), fast_k_period=5, fast_d_period=3, fast_d_ma_type=0)
TA-Lib name: STOCHF
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
fast_k_period |
optInFastK_Period |
int |
5 |
1 .. 100000 |
fast_d_period |
optInFastD_Period |
int |
3 |
1 .. 100000 |
fast_d_ma_type |
optInFastD_MAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
Outputs
| Field |
dtype |
fast_k |
Float64 |
fast_d |
Float64 |
Returned as a Struct.
Example
df.select(pta.stochf().alias("out")).unnest("out")
pta.stochrsi
Stochastic Relative Strength Index
pta.stochrsi(real=pl.col("close"), time_period=14, fast_k_period=5, fast_d_period=3, fast_d_ma_type=0)
TA-Lib name: STOCHRSI
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
fast_k_period |
optInFastK_Period |
int |
5 |
1 .. 100000 |
fast_d_period |
optInFastD_Period |
int |
3 |
1 .. 100000 |
fast_d_ma_type |
optInFastD_MAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
Outputs
| Field |
dtype |
fast_k |
Float64 |
fast_d |
Float64 |
Returned as a Struct.
Example
df.select(pta.stochrsi(time_period=20).alias("out")).unnest("out")
pta.trix
1-day Rate-Of-Change (ROC) of a Triple Smooth EMA
pta.trix(real=pl.col("close"), time_period=30)
TA-Lib name: TRIX
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
30 |
1 .. 100000 |
Outputs
Example
df.select(pta.trix(time_period=20).alias("trix"))
pta.tsi
True Strength Index
pta.tsi(real=pl.col("close"), first_period=25, second_period=13)
TA-Lib name: TSI
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
first_period |
optInFirstPeriod |
int |
25 |
2 .. 100000 |
second_period |
optInSecondPeriod |
int |
13 |
2 .. 100000 |
Outputs
Example
df.select(pta.tsi().alias("tsi"))
pta.ultosc
Ultimate Oscillator
pta.ultosc(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period1=7, time_period2=14, time_period3=28)
TA-Lib name: ULTOSC
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period1 |
optInTimePeriod1 |
int |
7 |
1 .. 100000 |
time_period2 |
optInTimePeriod2 |
int |
14 |
1 .. 100000 |
time_period3 |
optInTimePeriod3 |
int |
28 |
1 .. 100000 |
Outputs
Example
df.select(pta.ultosc().alias("ultosc"))
pta.vhf
Vertical Horizontal Filter
pta.vhf(real=pl.col("close"), time_period=28)
TA-Lib name: VHF
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
28 |
2 .. 100000 |
Outputs
Example
df.select(pta.vhf(time_period=20).alias("vhf"))
pta.vortex
Vortex Indicator
pta.vortex(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=14)
TA-Lib name: VORTEX
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
1 .. 100000 |
Outputs
| Field |
dtype |
plus_vi |
Float64 |
minus_vi |
Float64 |
Returned as a Struct.
Example
df.select(pta.vortex(time_period=20).alias("out")).unnest("out")
pta.wad
Williams' Accumulation/Distribution
pta.wad(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"))
TA-Lib name: WAD
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
None.
Outputs
Example
df.select(pta.wad().alias("wad"))
pta.wavetrend
WaveTrend Oscillator
pta.wavetrend(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), channel_period=10, average_period=21, signal_period=4)
TA-Lib name: WAVETREND
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
channel_period |
optInChannelPeriod |
int |
10 |
2 .. 100000 |
average_period |
optInAveragePeriod |
int |
21 |
1 .. 100000 |
signal_period |
optInSignalPeriod |
int |
4 |
1 .. 100000 |
Outputs
| Field |
dtype |
wt1 |
Float64 |
wt2 |
Float64 |
Returned as a Struct.
Example
df.select(pta.wavetrend().alias("out")).unnest("out")
pta.willr
Williams' %R
pta.willr(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=14)
TA-Lib name: WILLR
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
close |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
14 |
2 .. 100000 |
Outputs
Example
df.select(pta.willr(time_period=20).alias("willr"))