cycle_length
Mean bars between the close's crossings of its simple average over the last history swings
cycle_length
examples/site_showcase.rs// Mean bars between the close's crossings of its simple average over the last history swings (zero-crossing swing length, not a spectral cycle estimate); extra bars_since_crossing counts the swing in progress
// Defaults of "cycle_length" (see the indicator reference)
let params = HashMap::from([
("history".to_string(), 8.0),
("period".to_string(), 20.0),
]);
let mut indicator = build_checked("cycle_length", ¶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.