pub struct CmfEngine { /* private fields */ }Expand description
Chaikin Money Flow (CMF) over period bars.
Each bar’s money-flow multiplier places the close in its range,
MFM = ((close - low) - (high - close)) / (high - low) (0 for a range below 1e-8), and its
money-flow volume is MFM * volume. CMF is the sum of the last period money-flow volumes over
the sum of their volumes (0 without volume), clamped to -1..=1.
First output: with the period-th bar. Indicator::reset clears both windows.
Implementations§
Trait Implementations§
Source§impl Indicator for CmfEngine
impl Indicator for CmfEngine
fn name(&self) -> &str
fn warmup_period(&self) -> usize
fn reset(&mut self)
fn on_bar(&mut self, bar: &Bar) -> Option<IndicatorOutput>
fn alerts(&self) -> Vec<IndicatorAlert>
Source§fn on_checked_bar(
&mut self,
bar: &Bar,
) -> Result<Option<IndicatorOutput>, BarValidationError>
fn on_checked_bar( &mut self, bar: &Bar, ) -> Result<Option<IndicatorOutput>, BarValidationError>
Validates a bar before forwarding it to
Indicator::on_bar.Auto Trait Implementations§
impl Freeze for CmfEngine
impl RefUnwindSafe for CmfEngine
impl Send for CmfEngine
impl Sync for CmfEngine
impl Unpin for CmfEngine
impl UnsafeUnpin for CmfEngine
impl UnwindSafe for CmfEngine
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