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 -31
View File
@@ -1,5 +1,7 @@
# JBANDS: Jurik Adaptive Envelope Bands
> *Jurik's adaptive envelope adjusts its width with price dynamics, hugging trends and releasing during consolidation.*
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Channel |
@@ -100,37 +102,6 @@ Dominated by the trimmed mean's partial sort: $O(n \log n)$ for the 128-element
| $\text{sqrtDiv}$ | $\text{\_SQRT\_PARAM} / (\text{\_SQRT\_PARAM} + 1)$ |
| $P_{\text{exp}}$ | $\max(\text{\_LOG\_PARAM} - 2,\; 0.5)$ |
### Pseudo-code
```
function JBANDS(source, period, phase):
precompute constants from period and phase
// 1. Local deviation
dLocal = max(|source - upper|, |source - lower|) + ε
// 2. Volatility: 10-bar SMA → 128-bar trimmed mean
highD = SMA(dLocal, 10)
dRef = TrimmedMean(highD_history, 128)
// 3. Dynamic exponent
ratio = |source - band| / dRef
d = clamp(ratio^P_exp, 1, LOG_PARAM)
// 4. Snap-and-decay bands
adapt = sqrtDiv^√d
if source > upper: upper = source
else: upper = source - (source - upper) * adapt
(symmetric for lower)
// 5. JMA center line (2-pole IIR)
alpha = lenDiv^d
... (c0, c8, a8 recursion) ...
jma = prev_jma + a8
return [jma, upper, lower]
```
### Output Interpretation
| Output | Description |