kestrel-chartkitv0.33.0

← All examples

ulcer_index

Ulcer Index

ulcer_index

examples/site_showcase.rs
// Ulcer Index (root mean square of the percentage drawdowns below the running high)
// Defaults of "ulcer_index" (see the indicator reference)
let params = HashMap::from([
    ("len".to_string(), 14.0),
]);
let mut indicator = build_checked("ulcer_index", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Ulcer Index (root mean square of the percentage drawdowns below the running high). 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.Ulcer Index (root mean square of the percentage drawdowns below the running high). 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.
  • Volatility and trend strength
  • unit: Ratio