range_filter
Range Filter: a line that follows the close only when it leaves a band of mult times the double-smoothed …
range_filter
examples/site_showcase.rs// Range Filter: a line that follows the close only when it leaves a band of `mult` times the double-smoothed absolute close-to-close change (extras `upper`, `lower`, `direction`). The direction is the sign of the line's last move beyond a relative 1e-9 and starts at 0. Published from bar 2.
// Defaults of "range_filter" (see the indicator reference)
let params = HashMap::from([
("mult".to_string(), 3.0),
("period".to_string(), 100.0),
]);
let mut indicator = build_checked("range_filter", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}