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 -33
View File
@@ -1,5 +1,7 @@
# APZ: Adaptive Price Zone
> *The adaptive price zone contracts in calm and expands in chaos, mapping volatility into a living boundary.*
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Channel |
@@ -88,39 +90,6 @@ $$P_{\text{effective}} = \sqrt{P} \approx \frac{2}{\alpha} - 1$$
For $P = 20$: $P_{\text{eff}} \approx 4.47$. For $P = 100$: $P_{\text{eff}} \approx 10$.
### Pseudo-code
```
function APZ(source, high, low, period, multiplier):
validate: period > 0, multiplier > 0
alpha = 2 / (√period + 1)
beta = 1 - alpha
// Double-smoothed EMA of price
ema1_price = alpha * source + beta * ema1_price
center = alpha * ema1_price + beta * center
// Double-smoothed EMA of range
range = high - low
ema1_range = alpha * range + beta * ema1_range
smooth_range = alpha * ema1_range + beta * smooth_range
// Warmup compensator
e *= beta²
if e > 1e-10:
compensator = 1 / (1 - e)
center *= compensator
smooth_range *= compensator
// Bands
width = multiplier * smooth_range
upper = center + width
lower = center - width
return [center, upper, lower]
```
### Output Interpretation
| Output | Description |