kestrel-chartkitv0.43.0

← All examples

chart_patterns

Chart patterns from ZigZag swings as they confirm, one event per pattern instance on the bar its neckline o…

chart_patterns

examples/site_showcase.rs
// Chart patterns from ZigZag swings as they confirm, one event per pattern instance on the bar its neckline or boundary is broken: triangles (symmetrical, ascending, descending), broadening, rising and falling wedge, 1-2-3 reversal, Wolfe wave, double and triple top and bottom, head and shoulders and its inverse. value is the direction of the latest confirmed pattern (1, -1, 0); alerts bull_<kind> and bear_<kind>; extras pattern (kind code 1-14), level, invalidation, target, fit, active, confirmed
// Defaults of "chart_patterns" (see the indicator reference)
let params = HashMap::from([
    ("atr_len".to_string(), 14.0),
    ("backstep".to_string(), 2.0),
    ("depth".to_string(), 3.0),
    ("deviation_mode".to_string(), 0.0),
    ("deviation_pct".to_string(), 1.0),
    ("flat_pct".to_string(), 1.5),
    ("pending_swings".to_string(), 2.0),
    ("tolerance_pct".to_string(), 2.0),
]);
let mut indicator = build_checked("chart_patterns", &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.

Chart patterns from ZigZag swings as they confirm, one event per pattern instance on the bar its neckline or boundary is broken: triangles (symmetrical, ascending, descending), broadening, rising and falling wedge, 1-2-3 reversal, Wolfe wave, double and triple top and bottom, head and shoulders and its inverse. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 22 alerts in view, the latest as markers.Chart patterns from ZigZag swings as they confirm, one event per pattern instance on the bar its neckline or boundary is broken: triangles (symmetrical, ascending, descending), broadening, rising and falling wedge, 1-2-3 reversal, Wolfe wave, double and triple top and bottom, head and shoulders and its inverse. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 22 alerts in view, the latest as markers.
  • Market structure and patterns
  • unit: Unitless