kestrel-chartkitv0.49.0

← All examples

tpo_profile

Time-at-price profile after Steidlmayer and Koy

tpo_profile

examples/site_showcase.rs
// Time-at-price profile after Steidlmayer and Koy (1986) without volume: one count per bar and price bin over the window, value the point-of-control bin centre (ties toward the range centre, then toward the close), extras vah and val the 70 % value area edges
// Defaults of "tpo_profile" (see the indicator reference)
let params = HashMap::from([
    ("lookback".to_string(), 48.0),
    ("num_bins".to_string(), 30.0),
]);
let mut indicator = build_checked("tpo_profile", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Time-at-price profile after Steidlmayer and Koy (1986) without volume: one count per bar and price bin over the window, value the point-of-control bin centre (ties toward the range centre, then toward the close), extras vah and val the 70 % value area edges. 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.Time-at-price profile after Steidlmayer and Koy (1986) without volume: one count per bar and price bin over the window, value the point-of-control bin centre (ties toward the range centre, then toward the close), extras vah and val the 70 % value area edges. 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.
  • Volume
  • unit: Price