kestrel-chartkitv0.33.0

← All examples

midas

MIDAS launch-anchored curve with Topfinder/Bottomfinder projection

midas

examples/site_showcase.rs
// MIDAS launch-anchored curve with Topfinder/Bottomfinder projection (build_typed with mode=topfinder|bottomfinder)
// Defaults of "midas" (see the indicator reference)
let params = HashMap::from([
    ("maturity_bars".to_string(), 20.0),
]);
let mut indicator = build_checked("midas", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
MIDAS launch-anchored curve with Topfinder/Bottomfinder projection (build_typed with mode=topfinder|bottomfinder). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 3 alerts in view, the latest as markers.MIDAS launch-anchored curve with Topfinder/Bottomfinder projection (build_typed with mode=topfinder|bottomfinder). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 3 alerts in view, the latest as markers.
  • Moving averages, bands and trend lines
  • unit: Price