Overlap Studies
Back to API overview
34 functions.
pta.accbands
Acceleration Bands
pta.accbands(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=20)
TA-Lib name: ACCBANDS
| 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 |
20 |
2 .. 100000 |
Outputs
| Field |
dtype |
upper_band |
Float64 |
middle_band |
Float64 |
lower_band |
Float64 |
Returned as a Struct.
Example
df.select(pta.accbands(time_period=20).alias("out")).unnest("out")
pta.alma
Arnaud Legoux Moving Average
pta.alma(real=pl.col("close"), time_period=9, sigma=6, offset=0.85)
TA-Lib name: ALMA
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
9 |
1 .. 100000 |
sigma |
optInSigma |
float |
6 |
0.01 .. 3e+37 |
offset |
optInOffset |
float |
0.85 |
0 .. 1 |
Outputs
Example
df.select(pta.alma(time_period=20).alias("alma"))
pta.bbands
Bollinger Bands
pta.bbands(real=pl.col("close"), time_period=20, nb_dev_up=2, nb_dev_dn=2, ma_type=0)
TA-Lib name: BBANDS
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
20 |
2 .. 100000 |
nb_dev_up |
optInNbDevUp |
float |
2 |
-3e+37 .. 3e+37 |
nb_dev_dn |
optInNbDevDn |
float |
2 |
-3e+37 .. 3e+37 |
ma_type |
optInMAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
Outputs
| Field |
dtype |
upper_band |
Float64 |
middle_band |
Float64 |
lower_band |
Float64 |
Returned as a Struct.
Example
df.select(pta.bbands(time_period=20).alias("out")).unnest("out")
pta.cksp
Chande Kroll Stop
pta.cksp(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=10, multiplier=1, stop_period=9)
TA-Lib name: CKSP
| 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 |
10 |
2 .. 100000 |
multiplier |
optInMultiplier |
float |
1 |
0 .. 3e+37 |
stop_period |
optInStopPeriod |
int |
9 |
1 .. 100000 |
Outputs
| Field |
dtype |
high_stop |
Float64 |
low_stop |
Float64 |
Returned as a Struct.
Example
df.select(pta.cksp(time_period=20).alias("out")).unnest("out")
pta.dema
Double Exponential Moving Average
pta.dema(real=pl.col("close"), time_period=30)
TA-Lib name: DEMA
| 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.dema(time_period=20).alias("dema"))
pta.donchian
Donchian Channels
pta.donchian(high=pl.col("high"), low=pl.col("low"), time_period=20)
TA-Lib name: DONCHIAN
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
20 |
2 .. 100000 |
Outputs
| Field |
dtype |
upper_band |
Float64 |
middle_band |
Float64 |
lower_band |
Float64 |
Returned as a Struct.
Example
df.select(pta.donchian(time_period=20).alias("out")).unnest("out")
pta.ema
Exponential Moving Average
pta.ema(real=pl.col("close"), time_period=30)
TA-Lib name: EMA
| 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.ema(time_period=20).alias("ema"))
pta.frama
Fractal Adaptive Moving Average
pta.frama(high=pl.col("high"), low=pl.col("low"), time_period=16)
TA-Lib name: FRAMA
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
16 |
2 .. 100000 |
Outputs
Example
df.select(pta.frama(time_period=20).alias("frama"))
pta.hma
Hull Moving Average
pta.hma(real=pl.col("close"), time_period=20)
TA-Lib name: HMA
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
20 |
1 .. 100000 |
Outputs
Example
df.select(pta.hma(time_period=20).alias("hma"))
pta.ht_trendline
Hilbert Transform - Instantaneous Trendline
pta.ht_trendline(real=pl.col("close"))
TA-Lib name: HT_TRENDLINE
| Input |
Default |
real |
pl.col("close") |
Parameters
None.
Outputs
Example
df.select(pta.ht_trendline().alias("ht_trendline"))
pta.ichimoku
Ichimoku Kinko Hyo
pta.ichimoku(high=pl.col("high"), low=pl.col("low"), tenkan_period=9, kijun_period=26, senkou_b_period=52)
TA-Lib name: ICHIMOKU
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
tenkan_period |
optInTenkanPeriod |
int |
9 |
2 .. 100000 |
kijun_period |
optInKijunPeriod |
int |
26 |
2 .. 100000 |
senkou_b_period |
optInSenkouBPeriod |
int |
52 |
2 .. 100000 |
Outputs
| Field |
dtype |
tenkan_sen |
Float64 |
kijun_sen |
Float64 |
senkou_span_a |
Float64 |
senkou_span_b |
Float64 |
Returned as a Struct.
Example
df.select(pta.ichimoku().alias("out")).unnest("out")
pta.kama
Kaufman Adaptive Moving Average
pta.kama(real=pl.col("close"), time_period=30)
TA-Lib name: KAMA
| 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.kama(time_period=20).alias("kama"))
pta.kc
Keltner Channels
pta.kc(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=20, atr_period=10, nb_dev=2)
TA-Lib name: KC
| 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 |
20 |
2 .. 100000 |
atr_period |
optInATRPeriod |
int |
10 |
1 .. 100000 |
nb_dev |
optInNbDev |
float |
2 |
-3e+37 .. 3e+37 |
Outputs
| Field |
dtype |
upper_band |
Float64 |
middle_band |
Float64 |
lower_band |
Float64 |
Returned as a Struct.
Example
df.select(pta.kc(time_period=20).alias("out")).unnest("out")
pta.ma
Moving average
pta.ma(real=pl.col("close"), time_period=30, ma_type=0)
TA-Lib name: MA
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
30 |
1 .. 100000 |
ma_type |
optInMAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
Outputs
Example
df.select(pta.ma(time_period=20).alias("ma"))
pta.mama
MESA Adaptive Moving Average
pta.mama(real=pl.col("close"), fast_limit=0.5, slow_limit=0.05)
TA-Lib name: MAMA
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
fast_limit |
optInFastLimit |
float |
0.5 |
0.01 .. 0.99 |
slow_limit |
optInSlowLimit |
float |
0.05 |
0.01 .. 0.99 |
Outputs
| Field |
dtype |
mama |
Float64 |
fama |
Float64 |
Returned as a Struct.
Example
df.select(pta.mama().alias("out")).unnest("out")
pta.mavp
Moving average with variable period
pta.mavp(real=pl.col("close"), periods=pl.col("periods"), min_period=2, max_period=30, ma_type=0)
TA-Lib name: MAVP
| Input |
Default |
real |
pl.col("close") |
periods |
pl.col("periods") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
min_period |
optInMinPeriod |
int |
2 |
1 .. 10000 |
max_period |
optInMaxPeriod |
int |
30 |
1 .. 10000 |
ma_type |
optInMAType |
int or name |
0 |
SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, HMA, DISABLED, DEFAULT, ZLEMA, RMA, VIDYA, ALMA |
Outputs
Example
df.select(pta.mavp().alias("mavp"))
pta.mcgd
McGinley Dynamic
pta.mcgd(real=pl.col("close"), time_period=14)
TA-Lib name: MCGD
| 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.mcgd(time_period=20).alias("mcgd"))
pta.midpoint
MidPoint over period
pta.midpoint(real=pl.col("close"), time_period=14)
TA-Lib name: MIDPOINT
| 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.midpoint(time_period=20).alias("midpoint"))
pta.midprice
Midpoint Price over period
pta.midprice(high=pl.col("high"), low=pl.col("low"), time_period=14)
TA-Lib name: MIDPRICE
| 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.midprice(time_period=20).alias("midprice"))
pta.rma
Wilder's Smoothed Moving Average
pta.rma(real=pl.col("close"), time_period=30)
TA-Lib name: RMA
| 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.rma(time_period=20).alias("rma"))
pta.sar
Parabolic SAR
pta.sar(high=pl.col("high"), low=pl.col("low"), acceleration=0.02, maximum=0.2)
TA-Lib name: SAR
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
acceleration |
optInAcceleration |
float |
0.02 |
0 .. 3e+37 |
maximum |
optInMaximum |
float |
0.2 |
0 .. 3e+37 |
Outputs
Example
df.select(pta.sar().alias("sar"))
pta.sarext
Parabolic SAR - Extended
pta.sarext(high=pl.col("high"), low=pl.col("low"), start_value=0, offset_on_reverse=0, acceleration_init_long=0.02, acceleration_long=0.02, acceleration_max_long=0.2, acceleration_init_short=0.02, acceleration_short=0.02, acceleration_max_short=0.2)
TA-Lib name: SAREXT
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
start_value |
optInStartValue |
float |
0 |
-3e+37 .. 3e+37 |
offset_on_reverse |
optInOffsetOnReverse |
float |
0 |
0 .. 3e+37 |
acceleration_init_long |
optInAccelerationInitLong |
float |
0.02 |
0 .. 3e+37 |
acceleration_long |
optInAccelerationLong |
float |
0.02 |
0 .. 3e+37 |
acceleration_max_long |
optInAccelerationMaxLong |
float |
0.2 |
0 .. 3e+37 |
acceleration_init_short |
optInAccelerationInitShort |
float |
0.02 |
0 .. 3e+37 |
acceleration_short |
optInAccelerationShort |
float |
0.02 |
0 .. 3e+37 |
acceleration_max_short |
optInAccelerationMaxShort |
float |
0.2 |
0 .. 3e+37 |
Outputs
Example
df.select(pta.sarext().alias("sarext"))
pta.sma
Simple Moving Average
pta.sma(real=pl.col("close"), time_period=30)
TA-Lib name: SMA
| 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.sma(time_period=20).alias("sma"))
pta.supertrend
SuperTrend
pta.supertrend(high=pl.col("high"), low=pl.col("low"), close=pl.col("close"), time_period=10, multiplier=3)
TA-Lib name: SUPERTREND
| 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 |
10 |
2 .. 100000 |
multiplier |
optInMultiplier |
float |
3 |
0 .. 3e+37 |
Outputs
| Field |
dtype |
supertrend |
Float64 |
trend |
Int32 |
Returned as a Struct.
Example
df.select(pta.supertrend(time_period=20).alias("out")).unnest("out")
pta.swak_butter
Swiss Army Knife - Butterworth Filter
pta.swak_butter(real=pl.col("close"), time_period=20)
TA-Lib name: SWAK_BUTTER
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
20 |
2 .. 10000 |
Outputs
Example
df.select(pta.swak_butter(time_period=20).alias("swak_butter"))
pta.swak_gauss
Swiss Army Knife - Gaussian Filter
pta.swak_gauss(real=pl.col("close"), time_period=20)
TA-Lib name: SWAK_GAUSS
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
20 |
2 .. 10000 |
Outputs
Example
df.select(pta.swak_gauss(time_period=20).alias("swak_gauss"))
pta.t3
Triple Exponential Moving Average (T3)
pta.t3(real=pl.col("close"), time_period=5, v_factor=0.7)
TA-Lib name: T3
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
5 |
1 .. 100000 |
v_factor |
optInVFactor |
float |
0.7 |
0 .. 1 |
Outputs
Example
df.select(pta.t3(time_period=20).alias("t3"))
pta.tema
Triple Exponential Moving Average
pta.tema(real=pl.col("close"), time_period=30)
TA-Lib name: TEMA
| 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.tema(time_period=20).alias("tema"))
pta.trima
Triangular Moving Average
pta.trima(real=pl.col("close"), time_period=30)
TA-Lib name: TRIMA
| 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.trima(time_period=20).alias("trima"))
pta.vidya
Variable Index Dynamic Average
pta.vidya(real=pl.col("close"), time_period=12, cmo_period=9)
TA-Lib name: VIDYA
| Input |
Default |
real |
pl.col("close") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
12 |
1 .. 100000 |
cmo_period |
optInCMOPeriod |
int |
9 |
2 .. 100000 |
Outputs
Example
df.select(pta.vidya(time_period=20).alias("vidya"))
pta.vwma
Volume Weighted Moving Average
pta.vwma(real=pl.col("close"), volume=pl.col("volume"), time_period=30)
TA-Lib name: VWMA
| Input |
Default |
real |
pl.col("close") |
volume |
pl.col("volume") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
time_period |
optInTimePeriod |
int |
30 |
1 .. 100000 |
Outputs
Example
df.select(pta.vwma(time_period=20).alias("vwma"))
pta.wma
Weighted Moving Average
pta.wma(real=pl.col("close"), time_period=30)
TA-Lib name: WMA
| 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.wma(time_period=20).alias("wma"))
pta.zigzag
Zig Zag
pta.zigzag(high=pl.col("high"), low=pl.col("low"), sensitivity=5, min_trend_length=1)
TA-Lib name: ZIGZAG
| Input |
Default |
high |
pl.col("high") |
low |
pl.col("low") |
Parameters
| Parameter |
TA-Lib name |
Type |
Default |
Range / values |
sensitivity |
optInSensitivity |
float |
5 |
0 .. 100 |
min_trend_length |
optInMinTrendLength |
int |
1 |
1 .. 100000 |
Outputs
| Field |
dtype |
zig_zag |
Float64 |
trend |
Int32 |
pivot_idx |
Int32 |
Returned as a Struct.
Example
df.select(pta.zigzag().alias("out")).unnest("out")
pta.zlema
Zero-Lag Exponential Moving Average
pta.zlema(real=pl.col("close"), time_period=30)
TA-Lib name: ZLEMA
| 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.zlema(time_period=20).alias("zlema"))