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 -30
View File
@@ -1,5 +1,7 @@
# BBANDS: Bollinger Bands
> *Standard deviation channels adapt to the market's own volatility rhythm, expanding and contracting like breathing.*
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Channel |
@@ -78,36 +80,6 @@ The circular buffer maintains running sums of $x$ and $x^2$, enabling $O(1)$ com
| 2.0 | 95.4% | 75.0% |
| 3.0 | 99.7% | 88.9% |
### Pseudo-code
```
function BBANDS(source, period, multiplier):
validate: period > 0, multiplier > 0
// Circular buffer maintains running sums
sum += source; sumSq += source²
oldest = buffer[head]
if oldest exists: sum -= oldest; sumSq -= oldest²
// SMA (middle band)
middle = sum / count
// Population standard deviation
variance = max(0, sumSq/count - middle²)
sigma = √variance
dev = multiplier * sigma
// Bands
upper = middle + dev
lower = middle - dev
// Derived metrics
bandwidth = (upper - lower) / middle
percentB = (source - lower) / (upper - lower)
return [middle, upper, lower, bandwidth, percentB]
```
### Output Interpretation
| Output | Range | Meaning |