kestrel-chartkitv0.41.0

← All examples

point_and_figure

Point-and-figure chart: columns of X and O from a box size and a reversal in boxes; the current column with…

point_and_figure

examples/site_showcase.rs
// Point-and-figure chart: columns of X and O from a box size and a reversal in boxes; the current column with its number, direction and boxes on every bar
// Defaults of "point_and_figure" (see the indicator reference)
let params = HashMap::from([
    ("box_size".to_string(), 1.0),
    ("method".to_string(), 0.0),
    ("reversal".to_string(), 3.0),
]);
let mut indicator = build_checked("point_and_figure", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Point-and-figure chart: columns of X and O from a box size and a reversal in boxes; the current column with its number, direction and boxes on every bar. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 4 alerts in view, the latest as markers.Point-and-figure chart: columns of X and O from a box size and a reversal in boxes; the current column with its number, direction and boxes on every bar. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 4 alerts in view, the latest as markers.
  • Market structure and patterns
  • unit: Unitless