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 -19
View File
@@ -1,5 +1,7 @@
# MIDPRICE: Midpoint Price over Period
> *The midpoint of highest high and lowest low over a period anchors price to its range center.*
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Core |
@@ -71,25 +73,6 @@ $O(N)$ per bar where $N$ is the period, due to linear scan for max/min. For typi
| MEDPRICE | $(H + L) \times 0.5$ | TBar (single bar) | Stateless |
| Donchian Mid | Same as MIDPRICE | TBar (H/L channels) | Rolling window |
### Pseudo-code
```
function MIDPRICE(bar, period):
validate: period ≥ 1
h, l ← bar.High, bar.Low
// Substitute last-valid for non-finite inputs
if !finite(h): h ← lastValidHigh
if !finite(l): l ← lastValidLow
highBuffer.Add(h)
lowBuffer.Add(l)
result ← (highBuffer.Max() + lowBuffer.Min()) × 0.5
return result
```
### Output Interpretation
| Context | Meaning |