kestrel-chartkitv0.33.0

← All examples

ultimate_oscillator

Ultimate Oscillator

ultimate_oscillator

examples/site_showcase.rs
// Ultimate Oscillator
// Defaults of "ultimate_oscillator" (see the indicator reference)
let params = HashMap::from([
    ("period1".to_string(), 7.0),
    ("period2".to_string(), 14.0),
    ("period3".to_string(), 28.0),
]);
let mut indicator = build_checked("ultimate_oscillator", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Ultimate Oscillator. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 0 alerts in view, the latest as markers.Ultimate Oscillator. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 0 alerts in view, the latest as markers.
  • Oscillators
  • unit: Ratio