Cycle Indicators
8 functions.
pta.ht_dcperiod
Hilbert Transform - Dominant Cycle Period
pta.ht_dcperiod(real=pl.col("close"))
TA-Lib name: HT_DCPERIOD
Inputs
| Input | Default |
|---|---|
real |
pl.col("close") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.ht_dcperiod().alias("ht_dcperiod"))
pta.ht_dcphase
Hilbert Transform - Dominant Cycle Phase
pta.ht_dcphase(real=pl.col("close"))
TA-Lib name: HT_DCPHASE
Inputs
| Input | Default |
|---|---|
real |
pl.col("close") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.ht_dcphase().alias("ht_dcphase"))
pta.ht_phasor
Hilbert Transform - Phasor Components
pta.ht_phasor(real=pl.col("close"))
TA-Lib name: HT_PHASOR
Inputs
| Input | Default |
|---|---|
real |
pl.col("close") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
in_phase |
Float64 |
quadrature |
Float64 |
Returned as a Struct.
Example
df.select(pta.ht_phasor().alias("out")).unnest("out")
pta.ht_sine
Hilbert Transform - SineWave
pta.ht_sine(real=pl.col("close"))
TA-Lib name: HT_SINE
Inputs
| Input | Default |
|---|---|
real |
pl.col("close") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
sine |
Float64 |
lead_sine |
Float64 |
Returned as a Struct.
Example
df.select(pta.ht_sine().alias("out")).unnest("out")
pta.ht_trendmode
Hilbert Transform - Trend vs Cycle Mode
pta.ht_trendmode(real=pl.col("close"))
TA-Lib name: HT_TRENDMODE
Inputs
| Input | Default |
|---|---|
real |
pl.col("close") |
Parameters
None.
Outputs
| Field | dtype |
|---|---|
integer |
Int32 |
Example
df.select(pta.ht_trendmode().alias("ht_trendmode"))
pta.swak_2php
Swiss Army Knife - Two-Pole High-Pass Filter
pta.swak_2php(real=pl.col("close"), time_period=20)
TA-Lib name: SWAK_2PHP
Inputs
| Input | Default |
|---|---|
real |
pl.col("close") |
Parameters
| Parameter | TA-Lib name | Type | Default | Range / values |
|---|---|---|---|---|
time_period |
optInTimePeriod |
int | 20 | 2 .. 10000 |
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.swak_2php(time_period=20).alias("swak_2php"))
pta.swak_bp
Swiss Army Knife - Band-Pass Filter
pta.swak_bp(real=pl.col("close"), time_period=20, delta=0.1)
TA-Lib name: SWAK_BP
Inputs
| Input | Default |
|---|---|
real |
pl.col("close") |
Parameters
| Parameter | TA-Lib name | Type | Default | Range / values |
|---|---|---|---|---|
time_period |
optInTimePeriod |
int | 20 | 5 .. 2000 |
delta |
optInDelta |
float | 0.1 | 0.05 .. 0.5 |
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.swak_bp(time_period=20).alias("swak_bp"))
pta.swak_hp
Swiss Army Knife - High-Pass Filter
pta.swak_hp(real=pl.col("close"), time_period=20)
TA-Lib name: SWAK_HP
Inputs
| Input | Default |
|---|---|
real |
pl.col("close") |
Parameters
| Parameter | TA-Lib name | Type | Default | Range / values |
|---|---|---|---|---|
time_period |
optInTimePeriod |
int | 20 | 5 .. 100000 |
Outputs
| Field | dtype |
|---|---|
real |
Float64 |
Example
df.select(pta.swak_hp(time_period=20).alias("swak_hp"))