Struct yata::core::IndicatorResult
source · pub struct IndicatorResult { /* private fields */ }
Expand description
Every Indicator
proceed an input of OHLCV
and returns an IndicatorResult
which consist of some returned raw values and some calculated signals.
Indicator
may return up to 4 signals and 4 raw values at each step
Implementations§
source§impl IndicatorResult
impl IndicatorResult
sourcepub const SIZE: usize = 4usize
pub const SIZE: usize = 4usize
Size of pre-allocated result array For the most of cases it should not be used anywhere outside this crate
sourcepub fn values(&self) -> &[ValueType]
pub fn values(&self) -> &[ValueType]
Returns a slice of raw indicator values of current indicator result
sourcepub const fn signals_length(&self) -> u8
pub const fn signals_length(&self) -> u8
Returns count of signals
sourcepub const fn values_length(&self) -> u8
pub const fn values_length(&self) -> u8
Returns count of raw values
sourcepub const fn size(&self) -> (u8, u8)
pub const fn size(&self) -> (u8, u8)
Returns a tuple of count of raw values and count of signals
Trait Implementations§
source§impl Clone for IndicatorResult
impl Clone for IndicatorResult
source§fn clone(&self) -> IndicatorResult
fn clone(&self) -> IndicatorResult
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for IndicatorResult
impl Debug for IndicatorResult
source§impl<'de> Deserialize<'de> for IndicatorResult
impl<'de> Deserialize<'de> for IndicatorResult
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for IndicatorResult
impl Serialize for IndicatorResult
impl Copy for IndicatorResult
Auto Trait Implementations§
impl RefUnwindSafe for IndicatorResult
impl Send for IndicatorResult
impl Sync for IndicatorResult
impl Unpin for IndicatorResult
impl UnwindSafe for IndicatorResult
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