pub struct EMAPeriods {
pub short: ExponentialMovingAverage,
pub medium: ExponentialMovingAverage,
pub long: ExponentialMovingAverage,
}Expand description
Holds EMA indicators for different periods.
Fields§
§short: ExponentialMovingAverageShort period EMA.
medium: ExponentialMovingAverageMedium period EMA.
long: ExponentialMovingAverageLong period EMA.
Implementations§
Source§impl EMAPeriods
impl EMAPeriods
Sourcepub fn new_with_params(
short: Option<usize>,
medium: Option<usize>,
long: Option<usize>,
) -> Self
pub fn new_with_params( short: Option<usize>, medium: Option<usize>, long: Option<usize>, ) -> Self
Creates a new set of EMA indicators with the following periods:
- Short: defaults to 20 if not provided.
- Medium: defaults to 50 if not provided.
- Long: defaults to 200 if not provided.
Sourcepub fn get_values(&self) -> EMAValues
pub fn get_values(&self) -> EMAValues
Retrieves the current EMA values.
Auto Trait Implementations§
impl Freeze for EMAPeriods
impl RefUnwindSafe for EMAPeriods
impl Send for EMAPeriods
impl Sync for EMAPeriods
impl Unpin for EMAPeriods
impl UnwindSafe for EMAPeriods
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