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 -39
View File
@@ -1,5 +1,7 @@
# REGCHANNEL: Linear Regression Channel
> *A regression line flanked by standard error bands — the channel where statistics meets price trajectory.*
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Channel |
@@ -101,45 +103,6 @@ $$
For $n \geq 2$, $D > 0$ always, ensuring numerical stability.
### Pseudo-code
```
function regchannel(source[], period, multiplier):
buf = ring_buffer(period)
sum_x = period * (period - 1) / 2
sum_x2 = period * (period - 1) * (2 * period - 1) / 6
denom = period * sum_x2 - sum_x * sum_x
for each bar t:
buf.add(source[t])
n = buf.count
// pass 1: accumulate sums for regression
sum_y = 0
sum_xy = 0
for i = 0 to n-1:
y = buf[i]
sum_y += y
sum_xy += i * y
slope = (n * sum_xy - sum_x * sum_y) / denom
intercept = (sum_y - slope * sum_x) / n
middle = slope * (n - 1) + intercept
// pass 2: residual standard deviation
ssr = 0
for i = 0 to n-1:
predicted = slope * i + intercept
residual = buf[i] - predicted
ssr += residual * residual
stddev = sqrt(ssr / n)
upper = middle + multiplier * stddev
lower = middle - multiplier * stddev
emit (upper, middle, lower)
```
### Output Interpretation
| Output | Interpretation |