kestrel-chartkitv0.33.0

← All examples

awesome_oscillator

Awesome Oscillator

awesome_oscillator

examples/site_showcase.rs
// Awesome Oscillator
// Defaults of "awesome_oscillator" (see the indicator reference)
let params = HashMap::from([
    ("fast_period".to_string(), 5.0),
    ("slow_period".to_string(), 34.0),
]);
let mut indicator = build_checked("awesome_oscillator", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Awesome 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.Awesome 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: Unitless