correlation_trend
Ehlers' Correlation Trend Indicator: the Pearson correlation of the last length closes with a rising stra…
correlation_trend
examples/site_showcase.rs// Ehlers' Correlation Trend Indicator: the Pearson correlation of the last `length` closes with a rising straight line; a window of equal closes reads 0
// Defaults of "correlation_trend" (see the indicator reference)
let params = HashMap::from([
("length".to_string(), 20.0),
]);
let mut indicator = build_checked("correlation_trend", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}