feat: add EPA (Ehlers Phasor Analysis) indicator - TASC Nov 2022

This commit is contained in:
Miha Kralj
2026-03-19 09:22:04 -07:00
parent cd150a6b36
commit c98b0e2a57
15 changed files with 1715 additions and 0 deletions
+10
View File
@@ -24,6 +24,7 @@ __all__ = [
"acp",
"amfm",
"fsi",
"epa",
]
@@ -182,3 +183,12 @@ def fsi(close: object, period: int = 20, bandwidth: float = 0.1,
src, idx = _arr(close); n = len(src); dst = _out(n)
_check(_lib.qtl_fsi(_ptr(src), n, _ptr(dst), period, float(bandwidth)))
return _wrap(dst, idx, f"FSI_{period}", "cycles", offset)
def epa(close: object, period: int = 28,
offset: int = 0, **kwargs) -> object:
"""Ehlers Phasor Analysis."""
period = int(kwargs.get("length", period)); offset = int(offset)
src, idx = _arr(close); n = len(src); dst = _out(n)
_check(_lib.qtl_epa(_ptr(src), n, _ptr(dst), period))
return _wrap(dst, idx, f"EPA_{period}", "cycles", offset)