candle_classification
Normalised candle classification — reports every pattern it recognises
candle_classification
examples/site_showcase.rs// Normalised candle classification — reports every pattern it recognises
// Defaults of "candle_classification" (see the indicator reference)
let params = HashMap::from([
("atr_len".to_string(), 14.0),
("belt_hold_body_min".to_string(), 0.6),
("belt_hold_open_wick_max".to_string(), 0.03),
("doji_body_max".to_string(), 0.08),
("hammer_opposite_max".to_string(), 0.5),
("hammer_wick_body_min".to_string(), 2.0),
("marubozu_body_min".to_string(), 0.82),
("min_range_atr".to_string(), 0.5),
("pin_close_pos".to_string(), 0.65),
("pin_wick_min".to_string(), 0.55),
("spinning_top_body_max".to_string(), 0.3),
("trend_lookback".to_string(), 10.0),
("trend_min_atr".to_string(), 1.0),
("tweezer_tolerance".to_string(), 0.0015),
]);
let mut indicator = build_checked("candle_classification", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}