kestrel-chartkitv0.49.0

← All examples

setup_countdown

Setup

setup_countdown

examples/site_showcase.rs
// Setup (9) and countdown (13) exhaustion count after DeMark (1994), the core rules only: consecutive closes against the close four bars earlier from a price flip, then thirteen closes against the low or high two bars earlier, the 13th deferred until its low or high passes the close of the 8th count; a completed setup of the other side cancels a running countdown; equal closes break a setup; the later cancellation and recycle refinements are not implemented; value is the signed setup count, extra countdown the signed countdown count
// Defaults of "setup_countdown" (see the indicator reference)
let params = HashMap::new();
let mut indicator = build_checked("setup_countdown", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Setup (9) and countdown (13) exhaustion count after DeMark (1994), the core rules only: consecutive closes against the close four bars earlier from a price flip, then thirteen closes against the low or high two bars earlier, the 13th deferred until its low or high passes the close of the 8th count; a completed setup of the other side cancels a running countdown; equal closes break a setup; the lat. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 10 alerts in view, the latest as markers.Setup (9) and countdown (13) exhaustion count after DeMark (1994), the core rules only: consecutive closes against the close four bars earlier from a price flip, then thirteen closes against the low or high two bars earlier, the 13th deferred until its low or high passes the close of the 8th count; a completed setup of the other side cancels a running countdown; equal closes break a setup; the lat. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 10 alerts in view, the latest as markers.
  • Market structure and patterns
  • unit: Unitless