mama
Ehlers' MESA Adaptive Moving Average of the median price with its follower FAMA
mama
examples/site_showcase.rs// Ehlers' MESA Adaptive Moving Average of the median price with its follower FAMA (extras `fama`, `period`); published from the 50th bar. The price smoothing starts from the first closes and the Hilbert transform from the 7th bar, MAMA and FAMA from the price (Ehlers' listing starts every series from 0)
// Defaults of "mama" (see the indicator reference)
let params = HashMap::from([
("fast_limit".to_string(), 0.5),
("slow_limit".to_string(), 0.05),
]);
let mut indicator = build_checked("mama", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}