adx
Average Directional Index
adx
examples/site_showcase.rs// Average Directional Index
// Defaults of "adx" (see the indicator reference)
let params = HashMap::from([
("adx_smooth".to_string(), 14.0),
("di_len".to_string(), 14.0),
("level_weak".to_string(), 20.0),
]);
let mut indicator = build_checked("adx", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}