pub struct SourceMapped<I: Indicator> { /* private fields */ }Expand description
Wraps inner, feeding it a synthetic bar of source.extract(bar) on every OHLC field
(volume unchanged) instead of the original bar.
Implementations§
Trait Implementations§
Source§impl<I: Indicator> Indicator for SourceMapped<I>
impl<I: Indicator> Indicator for SourceMapped<I>
fn name(&self) -> &str
fn warmup_period(&self) -> usize
fn reset(&mut self)
fn on_bar(&mut self, bar: &Bar) -> Option<IndicatorOutput>
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.fn alerts(&self) -> Vec<IndicatorAlert>
Auto Trait Implementations§
impl<I> Freeze for SourceMapped<I>where
I: Freeze,
impl<I> RefUnwindSafe for SourceMapped<I>where
I: RefUnwindSafe,
impl<I> Send for SourceMapped<I>
impl<I> Sync for SourceMapped<I>
impl<I> Unpin for SourceMapped<I>where
I: Unpin,
impl<I> UnsafeUnpin for SourceMapped<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for SourceMapped<I>where
I: UnwindSafe,
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