refactor: remove unused JMA power parameter from entire stack

This commit is contained in:
Miha Kralj
2026-03-01 22:14:30 -08:00
parent ce04e2792b
commit fa77882be7
6 changed files with 24 additions and 35 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ HAS_FRAMA = _bind("qtl_frama", [_dp, _dp, _ci, _ci])
HAS_HOLT = _bind("qtl_holt", [_dp, _dp, _ci, _ci, _cd])
HAS_HTIT = _bind("qtl_htit", [_dp, _dp, _ci])
HAS_HWMA = _bind("qtl_hwma", [_dp, _dp, _ci, _ci])
HAS_JMA = _bind("qtl_jma", [_dp, _dp, _ci, _ci, _ci, _cd])
HAS_JMA = _bind("qtl_jma", [_dp, _dp, _ci, _ci, _ci])
HAS_KAMA = _bind("qtl_kama", [_dp, _dp, _ci, _ci, _ci, _ci])
HAS_LTMA = _bind("qtl_ltma", [_dp, _dp, _ci, _ci])
HAS_MAMA = _bind("qtl_mama", [_dp, _dp, _cd, _ci, _cd, _dp])
+2 -3
View File
@@ -107,16 +107,15 @@ def hwma(close: object, period: int = 14, offset: int = 0, **kwargs) -> object:
return _wrap(output, idx, f"HWMA_{period}", "trends_iir", offset)
def jma(close: object, period: int = 14, phase: int = 0, power: float = 0.45, offset: int = 0, **kwargs) -> object:
def jma(close: object, period: int = 14, phase: int = 0, offset: int = 0, **kwargs) -> object:
"""Jurik Moving Average."""
period = int(period)
phase = int(phase)
power = float(power)
offset = int(offset)
src, idx = _arr(close)
n = len(src)
output = _out(n)
_check(_lib.qtl_jma(_ptr(src), _ptr(output), n, period, phase, power))
_check(_lib.qtl_jma(_ptr(src), _ptr(output), n, period, phase))
return _wrap(output, idx, f"JMA_{period}", "trends_iir", offset)
+2 -2
View File
@@ -1146,13 +1146,13 @@ public static unsafe partial class Exports
}
[UnmanagedCallersOnly(EntryPoint = "qtl_jma")]
public static int QtlJma(double* source, double* output, int n, int period, int phase, double power)
public static int QtlJma(double* source, double* output, int n, int period, int phase)
{
if (source == null || output == null) return StatusCodes.QTL_ERR_NULL_PTR;
if (n <= 0) return StatusCodes.QTL_ERR_INVALID_LENGTH;
try
{
Jma.Batch(Src(source, n), Dst(output, n), period, phase, power);
Jma.Batch(Src(source, n), Dst(output, n), period, phase);
return StatusCodes.QTL_OK;
}
catch { return StatusCodes.QTL_ERR_INTERNAL; }