historical_volatility
Annualized Historical Volatility
historical_volatility
examples/site_showcase.rs// Annualized Historical Volatility
// Defaults of "historical_volatility" (see the indicator reference)
let params = HashMap::from([
("period".to_string(), 20.0),
]);
let mut indicator = build_checked("historical_volatility", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}