mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-24 21:48:03 +00:00
Merge branch 'dev'
This commit is contained in:
@@ -13,9 +13,7 @@
|
||||
| **PineScript** | [rwma.pine](rwma.pine) |
|
||||
|
||||
- RWMA weights each bar's contribution to the average by its price range (high minus low), giving greater influence to volatile bars and less to narr...
|
||||
- Parameterized by `period` (default 14).
|
||||
- Output range: Tracks input.
|
||||
- Requires `> period` bars of warmup before first valid output (IsHot = true).
|
||||
- **Similar:** [WMA](../wma/wma.md), [EMA](../../trends_IIR/ema/ema.md) | **Trading note:** Right-weighted MA; concentrates weight on recent data while maintaining FIR structure.
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
RWMA weights each bar's contribution to the average by its price range (high minus low), giving greater influence to volatile bars and less to narrow-range, indecisive bars. The logic: a bar with a large range represents stronger price discovery and carries more informational content than a low-range doji. This produces a moving average that gravitates toward prices established during high-activity periods, naturally incorporating volatility as a relevance signal without requiring a separate volatility indicator.
|
||||
@@ -120,4 +118,4 @@ O(1) per bar. The division is the dominant cost. Resync every 1000 bars prevents
|
||||
| Prefix sum of range | Partial | Same as above |
|
||||
| Final division | Yes | `VDIVPD` after prefix sums built; zero-guard via `VCMPPD` + blend |
|
||||
|
||||
Both prefix sums can be built with AVX2 prefix-scan kernels. Once built, all N sliding-window divisions can be computed in parallel. Batch speedup: approximately 4× over scalar for large series.
|
||||
Both prefix sums can be built with AVX2 prefix-scan kernels. Once built, all N sliding-window divisions can be computed in parallel. Batch speedup: approximately 4× over scalar for large series.
|
||||
Reference in New Issue
Block a user