kestrel-chartkitv0.33.0

← All examples

trix

TRIX

trix

examples/site_showcase.rs
// TRIX (rate of change of a triple-smoothed price series, in percent)
// Defaults of "trix" (see the indicator reference)
let params = HashMap::from([
    ("len".to_string(), 15.0),
    ("signal_len".to_string(), 9.0),
]);
let mut indicator = build_checked("trix", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
TRIX (rate of change of a triple-smoothed price series, in percent). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 0 alerts in view, the latest as markers.TRIX (rate of change of a triple-smoothed price series, in percent). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 0 alerts in view, the latest as markers.
  • Oscillators
  • unit: Ratio