kestrel-chartkitv0.33.0

← All examples

connors_rsi

Connors RSI

connors_rsi

examples/site_showcase.rs
// Connors RSI
// Defaults of "connors_rsi" (see the indicator reference)
let params = HashMap::from([
    ("rank_len".to_string(), 100.0),
    ("rsi_len".to_string(), 3.0),
    ("streak_len".to_string(), 2.0),
]);
let mut indicator = build_checked("connors_rsi", &params)?;

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