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
sourceimpl IndicatorResult
impl IndicatorResult
sourcepub const SIZE: usize
pub const SIZE: usize
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
sourceimpl Clone for IndicatorResult
impl Clone for IndicatorResult
sourcefn clone(&self) -> IndicatorResult
fn clone(&self) -> IndicatorResult
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for IndicatorResult
impl Debug for IndicatorResult
sourceimpl<'de> Deserialize<'de> for IndicatorResult
impl<'de> Deserialize<'de> for IndicatorResult
sourcefn 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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more