mantis-ta 0.6.5

Composable technical analysis and strategy engine for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
/// Detects cross-above/below events between two scalar series.
#[allow(dead_code)]
pub fn crosses_above(prev_left: f64, prev_right: f64, left: f64, right: f64) -> bool {
    left > right && prev_left <= prev_right
}

#[allow(dead_code)]
pub fn crosses_below(prev_left: f64, prev_right: f64, left: f64, right: f64) -> bool {
    left < right && prev_left >= prev_right
}