mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-20 11:38: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 @@
|
||||
# APCHANNEL: Adaptive Price Channel
|
||||
|
||||
> *An adaptive channel reshapes its width in real time, tracking the market's own sense of normal.*
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Channel |
|
||||
@@ -74,30 +76,6 @@ $$t_{1/2} = \frac{\ln 2}{\ln(1 / (1 - \alpha))}$$
|
||||
|
||||
For $\alpha = 0.2$: $t_{1/2} \approx 3.1$ bars. For $\alpha = 0.05$: $t_{1/2} \approx 13.5$ bars.
|
||||
|
||||
### Pseudo-code
|
||||
|
||||
```
|
||||
function APCHANNEL(high, low, alpha):
|
||||
validate: 0 < alpha ≤ 1
|
||||
decay = 1 - alpha
|
||||
|
||||
// EMA of highs
|
||||
if first_bar:
|
||||
upper = high
|
||||
else:
|
||||
upper = decay * upper + alpha * high
|
||||
|
||||
// EMA of lows
|
||||
if first_bar:
|
||||
lower = low
|
||||
else:
|
||||
lower = decay * lower + alpha * low
|
||||
|
||||
middle = (upper + lower) / 2
|
||||
|
||||
return [middle, upper, lower]
|
||||
```
|
||||
|
||||
### Output Interpretation
|
||||
|
||||
| Output | Description |
|
||||
|
||||
Reference in New Issue
Block a user