mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-02 03:37:42 +00:00
feat(dynamics): add PTA - Ehlers Precision Trend Analysis
TASC Sep 2024. Dual 2-pole Butterworth highpass bandpass for near-zero-lag trend extraction. HP(long) - HP(short) preserves cycles between shortPeriod and longPeriod. - Core: Pta.cs with O(1) streaming, Span batch, state rollback - Quantower: PtaIndicator adapter with LineSeries + SetValue - Tests: 31 lib + 11 Quantower (all passing) - Pine: pta.pine PineScript v6 reference - Docs: Pta.md canonical template v3 - Python: Exports.Generated.cs + _bridge.py + dynamics.py - Indexes: _sidebar.md, lib/_index.md, dynamics/_index.md, docs/indicators.md, docs/pinescript.md
This commit is contained in:
@@ -2316,6 +2316,19 @@ public static unsafe partial class Exports
|
||||
catch { return StatusCodes.QTL_ERR_INTERNAL; }
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly(EntryPoint = "qtl_pta")]
|
||||
public static int QtlPta(double* source, double* output, int n, int longPeriod, int shortPeriod)
|
||||
{
|
||||
if (source == null || output == null) return StatusCodes.QTL_ERR_NULL_PTR;
|
||||
if (n <= 0) return StatusCodes.QTL_ERR_INVALID_LENGTH;
|
||||
try
|
||||
{
|
||||
Pta.Batch(Src(source, n), Dst(output, n), longPeriod, shortPeriod);
|
||||
return StatusCodes.QTL_OK;
|
||||
}
|
||||
catch { return StatusCodes.QTL_ERR_INTERNAL; }
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly(EntryPoint = "qtl_rs")]
|
||||
public static int QtlRs(double* baseSeries, double* compSeries, double* output, int n, int smoothPeriod)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user