pub struct HHV {
pub cached: Vec<f64>,
/* private fields */
}
Expand description
Returns the highest value in a given time frame.
§Parameters
- n - size of the time frame (integer greater than 0). Default value is 14.
§Example
use quantaxis_rs::indicators::HHV;
use quantaxis_rs::Next;
let mut max = HHV::new(3).unwrap();
assert_eq!(max.next(7.0), 7.0);
assert_eq!(max.next(5.0), 7.0);
assert_eq!(max.next(4.0), 7.0);
assert_eq!(max.next(4.0), 5.0);
assert_eq!(max.next(8.0), 8.0);
Fields§
§cached: Vec<f64>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HHV
impl RefUnwindSafe for HHV
impl Send for HHV
impl Sync for HHV
impl Unpin for HHV
impl UnwindSafe for HHV
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more