kestrel-chartkitv0.49.0

← All examples

cyber_cycle

Ehlers' Cyber Cycle of the median price: a high-pass filtered cycle component with the previous bar's cycle…

cyber_cycle

examples/site_showcase.rs
// Ehlers' Cyber Cycle of the median price: a high-pass filtered cycle component with the previous bar's cycle as trigger (extra `trigger`); the first six bars carry the plain second difference of the price / 4, as in Ehlers' listing
// Defaults of "cyber_cycle" (see the indicator reference)
let params = HashMap::from([
    ("alpha".to_string(), 0.07),
]);
let mut indicator = build_checked("cyber_cycle", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Ehlers' Cyber Cycle of the median price: a high-pass filtered cycle component with the previous bar's cycle as trigger (extra `trigger`); the first six bars carry the plain second difference of the price / 4, as in Ehlers' listing. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 33 alerts in view, the latest as markers.Ehlers' Cyber Cycle of the median price: a high-pass filtered cycle component with the previous bar's cycle as trigger (extra `trigger`); the first six bars carry the plain second difference of the price / 4, as in Ehlers' listing. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 33 alerts in view, the latest as markers.
  • Oscillators
  • unit: Unitless