[][src]Struct yata::core::IndicatorResult

pub struct IndicatorResult { /* fields omitted */ }

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

impl IndicatorResult[src]

pub const SIZE: usize[src]

Size of pre-allocated result array For the most of cases it should not be used anywhere outside this crate

#[must_use]pub fn signals(&self) -> &[Action][src]

Returns a slice of signals of current indicator result

#[must_use]pub fn values(&self) -> &[ValueType][src]

Returns a slice of raw indicator values of current indicator result

#[must_use]pub const fn signals_length(&self) -> u8[src]

Returns count of signals

#[must_use]pub const fn values_length(&self) -> u8[src]

Returns count of raw values

#[must_use]pub const fn size(&self) -> (u8, u8)[src]

Returns a tuple of count of raw values and count of signals

#[must_use]pub fn value(&self, index: usize) -> ValueType[src]

Returns a raw value at given index

#[must_use]pub fn signal(&self, index: usize) -> Action[src]

Returns a signal at given index

#[must_use]pub fn new(values_slice: &[ValueType], signals_slice: &[Action]) -> Self[src]

Creates a new instance of IndicatorResult with provided values and signals

Trait Implementations

impl Clone for IndicatorResult[src]

impl Copy for IndicatorResult[src]

impl Debug for IndicatorResult[src]

impl<'de> Deserialize<'de> for IndicatorResult[src]

impl Serialize for IndicatorResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.