pub struct TechnicalIndicators { /* private fields */ }Implementations§
Source§impl TechnicalIndicators
impl TechnicalIndicators
pub fn new(config: IndicatorConfig) -> Self
pub fn add_price(&mut self, price: Decimal)
Sourcepub fn ema(&self, prices: &[Decimal], period: usize) -> Result<Decimal>
pub fn ema(&self, prices: &[Decimal], period: usize) -> Result<Decimal>
Exponential Moving Average
Sourcepub fn macd(&self) -> Result<(Decimal, Decimal, Decimal)>
pub fn macd(&self) -> Result<(Decimal, Decimal, Decimal)>
MACD (Moving Average Convergence Divergence)
Sourcepub fn calculate_all(&self) -> Result<IndicatorValues>
pub fn calculate_all(&self) -> Result<IndicatorValues>
Get all indicators at once
Auto Trait Implementations§
impl Freeze for TechnicalIndicators
impl RefUnwindSafe for TechnicalIndicators
impl Send for TechnicalIndicators
impl Sync for TechnicalIndicators
impl Unpin for TechnicalIndicators
impl UnwindSafe for TechnicalIndicators
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