pmo
Price Momentum Oscillator
pmo
examples/site_showcase.rs// Price Momentum Oscillator (twice-smoothed one-bar return with alpha = 2/length, scaled by ten)
// Defaults of "pmo" (see the indicator reference)
let params = HashMap::from([
("length_1".to_string(), 35.0),
("length_2".to_string(), 20.0),
("signal_len".to_string(), 10.0),
]);
let mut indicator = build_checked("pmo", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}