fractal_dimension
Fractal dimension of the price path over a trailing window, 1 for a straight line and towards 2 for noise: …
fractal_dimension
examples/site_showcase.rs// Fractal dimension of the price path over a trailing window, 1 for a straight line and towards 2 for noise: Ehlers' halving estimate (`halves`, clamped to 1..2) or path over range (`path`, unclamped)
// Defaults of "fractal_dimension" (see the indicator reference)
let params = HashMap::from([
("method".to_string(), 0.0),
("period".to_string(), 30.0),
]);
let mut indicator = build_checked("fractal_dimension", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}Not yet verified: no independent second implementation yet.