ultimate_smoother
Ehlers' UltimateSmoother, a two-pole smoother with unity gain at zero frequency and no lag on a straight li…
ultimate_smoother
examples/site_showcase.rs// Ehlers' UltimateSmoother, a two-pole smoother with unity gain at zero frequency and no lag on a straight line; the first three values are the closes, published from the `period`-th bar. The coefficients use pi in full, where Ehlers' listings truncate it to 3.14159 in the exponent.
// Defaults of "ultimate_smoother" (see the indicator reference)
let params = HashMap::from([
("period".to_string(), 20.0),
]);
let mut indicator = build_checked("ultimate_smoother", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}