EnhancedMarketSeries

Struct EnhancedMarketSeries 

Source
pub struct EnhancedMarketSeries {
    pub symbol: String,
    pub interval: Interval,
    pub series: Vec<Series>,
    pub asks: Vec<Ask>,
    pub indicators: Indicators,
}
Expand description

Holds the MarketSeries + the calculation for the supported indicators

Fields§

§symbol: String

holds symbol like: “GOOGL”

§interval: Interval

inteval from intraday to monthly

§series: Vec<Series>

the original series downloaded and parsed from publishers

§asks: Vec<Ask>

the request for technical indicators

§indicators: Indicators

calculated indicators

Implementations§

Source§

impl EnhancedMarketSeries

Source

pub fn with_sma(self, period: usize) -> Self

Simple Moving Average, a period must be provided over which it will be calculated

Source

pub fn with_ema(self, period: usize) -> Self

Exponential Moving Average, a period must be provided over which it will be calculated

Source

pub fn with_rsi(self, period: usize) -> Self

Relative Strength Index, a period must be provided over which it will be calculated

Source

pub fn with_stochastic(self, period: usize) -> Self

Stochastic Oscillator, a period must be provided over which it will be calculated

Source

pub fn with_macd(self, fast: usize, slow: usize, signal: usize) -> Self

Moving average convergence/divergence (MACD), a fast, slow & signal EMA values should be provided, default (12, 26, 9)

Source

pub fn with_bb(self, period: usize, std_dev: usize) -> Self

Bollinger Bands (BB), the period & standard deviation values should be provided, like (20, 2)

Source

pub fn calculate(self) -> Self

Calculate the indicators and populate within the EnhancedMarketSeries struct

Trait Implementations§

Source§

impl Debug for EnhancedMarketSeries

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for EnhancedMarketSeries

Source§

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 Display for EnhancedMarketSeries

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for EnhancedMarketSeries

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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