F1: add SMMA and TRIMA moving averages (core)
First step of the indicator-family expansion (see the F section of todo-detailed.md). Family F1 — Simple & Weighted MAs — gains two members alongside the existing Sma/Ema/Wma: - Smma — Wilder's smoothed moving average (RMA): SMA-seeded, then the (prev*(n-1)+x)/n recurrence. The average underlying RSI and ATR. - Trima — triangular moving average: two stacked SMAs (n1/n2 split by parity) that triangular-weight the window. Genuine stacking — the outer SMA consumes the inner SMA's output. Both implement the full Indicator trait with reference-value, warmup, reset, batch==streaming and non-finite-input tests, a runnable doctest, and are re-exported from the crate root. 208 core tests + 30 doctests pass; clippy and fmt clean.
This commit is contained in:
@@ -23,8 +23,10 @@ mod psar;
|
||||
mod roc;
|
||||
mod rsi;
|
||||
mod sma;
|
||||
mod smma;
|
||||
mod stochastic;
|
||||
mod tema;
|
||||
mod trima;
|
||||
mod trix;
|
||||
mod vwap;
|
||||
mod williams_r;
|
||||
@@ -49,8 +51,10 @@ pub use psar::Psar;
|
||||
pub use roc::Roc;
|
||||
pub use rsi::Rsi;
|
||||
pub use sma::Sma;
|
||||
pub use smma::Smma;
|
||||
pub use stochastic::{Stochastic, StochasticOutput};
|
||||
pub use tema::Tema;
|
||||
pub use trima::Trima;
|
||||
pub use trix::Trix;
|
||||
pub use vwap::{RollingVwap, Vwap};
|
||||
pub use williams_r::WilliamsR;
|
||||
|
||||
Reference in New Issue
Block a user