[−][src]Struct yata::core::IndicatorResult
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]
pub fn clone(&self) -> IndicatorResult
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for IndicatorResult
[src]
impl Debug for IndicatorResult
[src]
impl<'de> Deserialize<'de> for IndicatorResult
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for IndicatorResult
[src]
Auto Trait Implementations
impl RefUnwindSafe for IndicatorResult
[src]
impl Send for IndicatorResult
[src]
impl Sync for IndicatorResult
[src]
impl Unpin for IndicatorResult
[src]
impl UnwindSafe for IndicatorResult
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,