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 @@
# IMI: Intraday Momentum Index
> *Intraday momentum index applies RSI logic to candle bodies — bullish closes accumulate strength, bearish closes accumulate weakness.*
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Oscillator |
@@ -64,39 +66,6 @@ When both sums are zero (all doji bars in window), IMI defaults to 50.0 (neutral
|--------|-----------|---------|------------|
| $N$ | period | 14 | $N \geq 1$ |
### Pseudo-code
```
Initialize:
gainBuf = RingBuffer(period)
lossBuf = RingBuffer(period)
gainSum = lossSum = 0
bar_count = 0
On each bar (open, close, isNew):
if !isNew: restore previous state
// Classify bar
diff = close - open
gain = diff > 0 ? diff : 0
loss = diff < 0 ? -diff : 0
// Update rolling sums
if gainBuf is full:
gainSum -= gainBuf.Oldest
lossSum -= lossBuf.Oldest
gainBuf.Add(gain)
lossBuf.Add(loss)
gainSum += gain
lossSum += loss
// IMI calculation
total = gainSum + lossSum
IMI = total > 0 ? 100 × gainSum / total : 50.0
output = IMI
```
### IMI vs RSI Comparison
| Property | RSI | IMI |