leg_character
Leg Character: character of the live leg from the last alternating pivot
leg_character
examples/site_showcase.rs// Leg Character: character of the live leg from the last alternating pivot (min_leg_atr filter) to the current extreme, from ten features (efficiency, overlap, retracement, commitment, wick cleanliness, momentum/true-range expansion, EMA support, cleanliness, acceptance); value = impulse score 0..100 (correction = 100 - impulse, both pulled to 50 by maturity); extra: correction, confidence, maturity, bars, direction, class, leg_start, the ten features, internal_swings, avg_internal_swing_atr, progression_ratio, sub_leg_growth; state impulse/correction/neutral with hysteresis; alerts bull/bear_impulse (leg direction), correction_started, character_lost
// Defaults of "leg_character" (see the indicator reference)
let params = HashMap::from([
("change_buffer".to_string(), 5.0),
("correction_threshold".to_string(), 62.0),
("impulse_threshold".to_string(), 62.0),
("ma_len".to_string(), 34.0),
("mature_bars".to_string(), 8.0),
("max_leg_bars".to_string(), 350.0),
("min_leg_atr".to_string(), 0.5),
("pivot_left".to_string(), 5.0),
("pivot_right".to_string(), 5.0),
]);
let mut indicator = build_checked("leg_character", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}