mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 18:48: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:
+2
-27
@@ -1,5 +1,7 @@
|
||||
# CCYC: Ehlers Cyber Cycle
|
||||
|
||||
> *The Cyber Cycle isolator extracts the dominant cycle component while suppressing trend — pure periodicity distilled.*
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Cycle |
|
||||
@@ -109,33 +111,6 @@ $$z^2 - 2(1-\alpha)z + (1-\alpha)^2 = 0$$
|
||||
|
||||
has a double pole at $z = 1 - \alpha$. For $\alpha = 0.07$, the pole is at $z = 0.93$, well inside the unit circle (stable), with a $-3$ dB cutoff period of approximately $\frac{2\pi}{\alpha} \approx 90$ bars.
|
||||
|
||||
### Pseudo-code
|
||||
|
||||
```
|
||||
function CCYC(source, alpha):
|
||||
validate: 0 < alpha < 1
|
||||
|
||||
// FIR smoother
|
||||
smooth = (source[0] + 2*source[1] + 2*source[2] + source[3]) / 6
|
||||
|
||||
// IIR coefficients
|
||||
c_hp = (1 - 0.5*alpha)²
|
||||
c_fb1 = 2*(1 - alpha)
|
||||
c_fb2 = -(1 - alpha)²
|
||||
|
||||
if bar_count < 7:
|
||||
// Bootstrap: second-difference of raw price
|
||||
cycle = (source[0] - 2*source[1] + source[2]) / 4
|
||||
else:
|
||||
// Steady-state: 2-pole high-pass on smoothed input
|
||||
cycle = c_hp * (smooth - 2*smooth[1] + smooth[2])
|
||||
+ c_fb1 * cycle[1] + c_fb2 * cycle[2]
|
||||
|
||||
trigger = cycle[1]
|
||||
|
||||
return [cycle, trigger]
|
||||
```
|
||||
|
||||
### Output Interpretation
|
||||
|
||||
| Output | Description |
|
||||
|
||||
Reference in New Issue
Block a user