Skip to content

HT_PHASOR

Summary

Hilbert Transform indicator that decomposes the price series into its in-phase (I) and quadrature (Q) phasor components. Shares the same detrend/Hilbert machinery as the other HT_* cycle functions.

Formula

Smooth price with a 4-bar WMA (weights 1,2,3,4 /10). Apply the Hilbert Transform (a=0.0962, b=0.5769, scaled per bar by adjustedPrevPeriod = 0.075*period + 0.54) to get detrender = HT(smoothed) and Q1 = HT(detrender). Output: outInPhase = detrender delayed 3 price bars; outQuadrature = Q1.

Inputs

  • inReal — Source price series

Outputs

  • outInPhase — In-phase component (detrender delayed 3 bars)
  • outQuadrature — Quadrature component (Q1 of the Hilbert Transform)

Implementation

TA-Lib Definition: ht_phasor.c · ht_phasor.yaml

Native File
C ta_HT_PHASOR.c
Rust ht_phasor.rs
Java Core.java

TA-Lib is also available for Python, R and more using a wrapper.

Aliases

Hilbert Transform Phasor, InPhase Quadrature

See Also

HT_DCPERIOD · HT_DCPHASE · HT_SINE · HT_TRENDMODE · MAMA · WMA

References

  • John F. Ehlers, Rocket Science for Traders: Digital Signal Processing Applications, John Wiley & Sons (ISBN 0471405671)