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 -32
View File
@@ -1,5 +1,7 @@
# HT_DCPHASE: Ehlers Hilbert Transform Dominant Cycle Phase
> *Dominant cycle phase tracks where price sits within its current cycle — the angular position of the market's heartbeat.*
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Cycle |
@@ -64,38 +66,6 @@ $O(P)$ per bar where $P$ is the smoothed period (typically 6-50), due to the DFT
All internal constants are fixed by the TA-Lib specification.
### Pseudo-code
```
function HT_DCPHASE(source):
// Same Hilbert cascade as HT_DCPERIOD
// ... (WMA smooth, Hilbert FIR, phasor, homodyne)
// Produces: smoothPeriod, smoothPriceBuf
for each bar (after warmup):
P ← round(smoothPeriod)
// DFT accumulation over dominant period
realPart ← 0; imagPart ← 0
for i = 0 to P-1:
realPart += sin(2π·i / P) · smoothPriceBuf[t - i]
imagPart += cos(2π·i / P) · smoothPriceBuf[t - i]
// Phase extraction
if |imagPart| > 0:
dcPhase ← atan(realPart / imagPart) · (180/π)
else:
dcPhase ← 90 · sign(realPart)
if imagPart > 0: dcPhase -= 180
dcPhase += 90
// Wrap to [-45, 315]
if dcPhase < -45: dcPhase += 360
emit dcPhase
```
### Phase Quadrant Interpretation
| Phase Range | Cycle Position |