pub struct AroonState {
pub prev_aroon_down: Float,
pub prev_aroon_up: Float,
pub prev_high_window: VecDeque<Float>,
pub prev_low_window: VecDeque<Float>,
pub period: usize,
}Expand description
§AROON calculation state
This struct holds the state of the calculation. It is used to calculate the next values in a incremental way.
§Attributes
Previous outputs values
prev_aroon_down: The previous AROON Down value.prev_aroon_up: The previous AROON Up value.
State values
prev_high_window: A window of the previous high prices.prev_low_window: A window of the previous low prices.
Parameters
period: The period used for the AROON calculation.
Fields§
§prev_aroon_down: FloatThe previous AROON Down value
prev_aroon_up: FloatThe previous AROON Up value
prev_high_window: VecDeque<Float>The previous high prices window
prev_low_window: VecDeque<Float>The previous low prices window
period: usizeThe period used for the AROON calculation
Trait Implementations§
Source§impl Clone for AroonState
impl Clone for AroonState
Source§impl Debug for AroonState
impl Debug for AroonState
Source§impl State<AroonSample> for AroonState
impl State<AroonSample> for AroonState
Source§fn update(&mut self, sample: AroonSample) -> Result<(), TechalibError>
fn update(&mut self, sample: AroonSample) -> Result<(), TechalibError>
Update the AroonState with a new sample
§Input Arguments
sample: The new input to update the AROON state
Auto Trait Implementations§
impl Freeze for AroonState
impl RefUnwindSafe for AroonState
impl Send for AroonState
impl Sync for AroonState
impl Unpin for AroonState
impl UnsafeUnpin for AroonState
impl UnwindSafe for AroonState
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