kestrel-chartkitv0.43.0

← All examples

percent_rank

Percent rank of the close among the previous period closes: the share, in percent, at or below the current …

percent_rank

examples/site_showcase.rs
// Percent rank of the close among the previous period closes: the share, in percent, at or below the current close
// Defaults of "percent_rank" (see the indicator reference)
let params = HashMap::from([
    ("period".to_string(), 20.0),
]);
let mut indicator = build_checked("percent_rank", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}

Not yet verified: no independent second implementation yet.

Percent rank of the close among the previous period closes: the share, in percent, at or below the current close. 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.Percent rank of the close among the previous period closes: the share, in percent, at or below the current close. 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