kestrel-chartkitv0.33.0

← All examples

vwap

Rolling Volume Weighted Average Price with sigma bands and slope

vwap

examples/site_showcase.rs
// Rolling Volume Weighted Average Price with sigma bands and slope
// Defaults of "vwap" (see the indicator reference)
let params = HashMap::from([
    ("slope_lookback".to_string(), 20.0),
    ("window".to_string(), 390.0),
]);
let mut indicator = build_checked("vwap", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Rolling Volume Weighted Average Price with sigma bands and slope. 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.Rolling Volume Weighted Average Price with sigma bands and slope. 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