pub struct IndicatorCalculator {
pub fast_ema_period: usize,
pub slow_ema_period: usize,
pub atr_period: usize,
}Expand description
Multi-period indicator calculator (batch mode).
Fields§
§fast_ema_period: usize§slow_ema_period: usize§atr_period: usizeImplementations§
Source§impl IndicatorCalculator
impl IndicatorCalculator
pub fn new(fast_ema: usize, slow_ema: usize, atr_period: usize) -> Self
pub fn calculate_all( &self, close: &[f64], high: &[f64], low: &[f64], ) -> Result<StrategyIndicators, IndicatorError>
Trait Implementations§
Source§impl Clone for IndicatorCalculator
impl Clone for IndicatorCalculator
Source§fn clone(&self) -> IndicatorCalculator
fn clone(&self) -> IndicatorCalculator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndicatorCalculator
impl Debug for IndicatorCalculator
Auto Trait Implementations§
impl Freeze for IndicatorCalculator
impl RefUnwindSafe for IndicatorCalculator
impl Send for IndicatorCalculator
impl Sync for IndicatorCalculator
impl Unpin for IndicatorCalculator
impl UnsafeUnpin for IndicatorCalculator
impl UnwindSafe for IndicatorCalculator
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