Refactor documentation to remove "Zero-Allocation Design" sections across various trend indicators and implement a PowerShell script for automated cleanup

- Updated mathematical foundations and performance profiles where necessary to maintain clarity and coherence.
This commit is contained in:
Miha Kralj
2025-12-21 14:37:44 -08:00
parent 54c309e5cf
commit a7b7207801
65 changed files with 1766 additions and 482 deletions
-8
View File
@@ -17,14 +17,6 @@ DEMA is a composite indicator built from two EMAs.
The "physics" relies on the fact that EMA2 lags EMA1 roughly as much as EMA1 lags the price. Therefore, $2 \times \text{EMA1} - \text{EMA2}$ pushes the value forward, correcting the lag.
### Zero-Allocation Design
Since DEMA is composed of two EMAs, and our EMA implementation is zero-allocation, DEMA inherits this efficiency.
- **State Structs**: We use lightweight `struct`s to hold the state of both internal EMAs.
- **Inlining**: The calculation is aggressive inlined.
- **No Buffers**: DEMA is recursive; it needs no history buffer, just the previous state.
## Mathematical Foundation
$$ \text{EMA}_1 = \text{EMA}(P, N) $$