demarker
DeMarker: the sum of the rises of the high over the sum of the rises of the high and the falls of the low a…
demarker
examples/site_showcase.rs// DeMarker: the sum of the rises of the high over the sum of the rises of the high and the falls of the low across `period` bars; 0 to 1, and 0.5 on a window without rises or falls. Published from bar period + 1.
// Defaults of "demarker" (see the indicator reference)
let params = HashMap::from([
("lower".to_string(), 0.3),
("period".to_string(), 14.0),
("upper".to_string(), 0.7),
]);
let mut indicator = build_checked("demarker", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}