kestrel-chartkitv0.33.0

← All examples

anchored_vwap

Anchored VWAP Engine

anchored_vwap

examples/site_showcase.rs
// Anchored VWAP Engine
// Defaults of "anchored_vwap" (see the indicator reference)
let params = HashMap::from([
    ("mult1".to_string(), 1.0),
    ("mult2".to_string(), 2.0),
]);
let mut indicator = build_checked("anchored_vwap", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Anchored VWAP Engine. 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.Anchored VWAP Engine. 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.
  • Moving averages, bands and trend lines
  • unit: Price