feat(dynamics): add PlusDI, MinusDI, PlusDM, MinusDM indicators

Complete thin Dx-composition wrapper indicators with full test coverage:

- PlusDi/MinusDi: Directional Indicator wrappers (DiPlus/DiMinus from Dx)
- PlusDm/MinusDm: Directional Movement wrappers (DmPlus/DmMinus from Dx)
- Individual validation tests per indicator directory (TALib, Skender, bounds)
- Combined unit tests (DiDm.Tests.cs) and validation tests (DiDm.Validation.Tests.cs)
- Quantower wrappers + tests for all 4 indicators
- PineScript v6 implementations with compensated RMA
- Normalized .md documentation for all indicators and categories
- 182 tests passing, 0 failures
This commit is contained in:
Miha Kralj
2026-03-11 20:21:52 -07:00
parent 56b86bebfb
commit 33d20f2a18
437 changed files with 4589 additions and 2792 deletions
+2 -44
View File
@@ -1,5 +1,7 @@
# SSFDSP: Ehlers SSF Detrended Synthetic Price
> *SSF-based detrended synthetic price applies a super smoother before extracting cycles, achieving cleaner periodicity isolation.*
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Cycle |
@@ -70,50 +72,6 @@ $O(1)$ per bar. Two independent 2-pole IIR filters with $O(1)$ memory. Warmup: a
The SSF has $-3$ dB attenuation at the cutoff period, $-12$ dB/octave rolloff (2-pole), and zero phase lag at the cutoff. This is equivalent to a critically-damped Butterworth filter.
### Pseudo-code
```
function SSFDSP(source, period):
pFast ← max(2, round(period / 4))
pSlow ← max(3, round(period / 2))
// Fast SSF coefficients
αf ← √2·π / pFast
c2f ← 2·exp(-αf)·cos(αf)
c3f ← -exp(-2·αf)
c1f ← 1 - c2f - c3f
// Slow SSF coefficients
αs ← √2·π / pSlow
c2s ← 2·exp(-αs)·cos(αs)
c3s ← -exp(-2·αs)
c1s ← 1 - c2s - c3s
ssfFast_1 ← 0; ssfFast_2 ← 0
ssfSlow_1 ← 0; ssfSlow_2 ← 0
p_prev ← 0
for each price in source:
// Input averaging
avg ← (price + p_prev) / 2
// Fast SSF update
ssfFast ← c1f·avg + c2f·ssfFast_1 + c3f·ssfFast_2
// Slow SSF update
ssfSlow ← c1s·avg + c2s·ssfSlow_1 + c3s·ssfSlow_2
// SSFDSP
ssfdsp ← ssfFast - ssfSlow
// Shift state
ssfFast_2 ← ssfFast_1; ssfFast_1 ← ssfFast
ssfSlow_2 ← ssfSlow_1; ssfSlow_1 ← ssfSlow
p_prev ← price
emit ssfdsp
```
### DSP vs SSFDSP
| Aspect | DSP (EMA-based) | SSFDSP (Super-Smoother) |