mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-19 19:18:05 +00:00
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:
@@ -1,5 +1,7 @@
|
||||
# ACCBANDS: Acceleration Bands
|
||||
|
||||
> *Acceleration bands widen with high-low range, framing the expected reach of each bar's ambition.*
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Channel |
|
||||
@@ -63,26 +65,6 @@ Three independent circular buffers maintain running sums for $O(1)$ streaming up
|
||||
| `period` | Lookback period for the three SMAs ($n$) | 20 | $> 0$ |
|
||||
| `factor` | Multiplier for normalized width ($F$) | 4.0 | $> 0$ |
|
||||
|
||||
### Pseudo-code
|
||||
|
||||
```
|
||||
function ACCBANDS(high, low, close, period, factor):
|
||||
// Per-bar normalized width
|
||||
denom = high + low
|
||||
w = denom ≠ 0 ? (high - low) / denom : 0
|
||||
|
||||
// Adjusted prices
|
||||
adj_high = high * (1 + factor * w)
|
||||
adj_low = low * (1 - factor * w)
|
||||
|
||||
// Three independent SMAs
|
||||
upper = SMA(adj_high, period)
|
||||
lower = SMA(adj_low, period)
|
||||
middle = SMA(close, period)
|
||||
|
||||
return [middle, upper, lower]
|
||||
```
|
||||
|
||||
### Breakout Rule (Headley)
|
||||
|
||||
A trend is confirmed when:
|
||||
|
||||
Reference in New Issue
Block a user