pub struct BarInput<'a> {
pub candle: &'a Candle,
pub reference: Option<f64>,
pub deriv: Option<DerivativesTick>,
pub orderbook: Option<&'a OrderBook>,
pub trades: &'a [Trade],
pub cross_section: Option<&'a CrossSection>,
}Expand description
Everything an indicator may consume on one bar. Single-instrument indicators
use candle; pairwise indicators also use reference; derivatives,
order-book and trade indicators use deriv / orderbook / trades. Feeds
that are absent are None / empty.
Fields§
§candle: &'a CandleThe current bar.
reference: Option<f64>The reference series’ close (for pairwise indicators).
deriv: Option<DerivativesTick>The derivatives tick for this bar (for derivatives indicators).
orderbook: Option<&'a OrderBook>The order-book snapshot for this bar (for order-book indicators).
trades: &'a [Trade]The trades that printed within this bar (for trade-flow indicators), replayed in order; empty when there is no trade feed.
cross_section: Option<&'a CrossSection>The market cross-section for this bar (for breadth indicators).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for BarInput<'a>
impl<'a> RefUnwindSafe for BarInput<'a>
impl<'a> Send for BarInput<'a>
impl<'a> Sync for BarInput<'a>
impl<'a> Unpin for BarInput<'a>
impl<'a> UnsafeUnpin for BarInput<'a>
impl<'a> UnwindSafe for BarInput<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more