accumulation_phase
Accumulation Phase: accumulation
accumulation_phase
examples/site_showcase.rs// Accumulation Phase: accumulation (bottom) and distribution (top) as process states from five components 0..2 each (trend loss, range formation, volatility compression, liquidity sweeps/springs, early structure); value = accumulation score 0..10, secondary = distribution score; extra: components per side, accum/dist_bars, accum/dist_state (0 none .. 5 breakout/breakdown ready), efficiency, bbw_ratio, atr_ratio, range_atr; alerts bull_accumulation_developing/_mature, bull_breakout_ready, bear_distribution_developing/_mature, bear_breakdown_ready
// Defaults of "accumulation_phase" (see the indicator reference)
let params = HashMap::from([
("atr_compress".to_string(), 0.8),
("atr_len".to_string(), 14.0),
("bbw_compress".to_string(), 0.7),
("er_range".to_string(), 0.3),
("lookback".to_string(), 20.0),
("min_phase_bars".to_string(), 10.0),
("pivot_left".to_string(), 3.0),
("pivot_right".to_string(), 3.0),
]);
let mut indicator = build_checked("accumulation_phase", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}