[][src]Struct market_finance::Bar

pub struct Bar {
    pub timestamp: i64,
    pub open: f64,
    pub high: f64,
    pub low: f64,
    pub close: f64,
    pub volume: Option<u64>,
}

A single 'bar' of information for OHLC (+volume) pricing data over a unit of time.

  • Bars are ordered by the timestamp.
  • The unit of time is defined by whatever function returns the Bar, but is generally one day.

Fields

timestamp: i64

A time during the unit of time - usually the time at open.

open: f64

The price at the start of the unit of time

high: f64

The highest price seen during the unit of time

low: f64

The lowest price seen during the unit of time

close: f64

The price at the end of the unit of time

volume: Option<u64>

The optional volume traded during the unit of time

Trait Implementations

impl Clone for Bar[src]

impl Copy for Bar[src]

impl Debug for Bar[src]

impl Eq for Bar[src]

impl Ord for Bar[src]

impl PartialEq<Bar> for Bar[src]

impl PartialOrd<Bar> for Bar[src]

impl Timestamped for Bar[src]

fn timestamp_millis(&self) -> i64[src]

Gets the timestamp in millisecond accuracy

Auto Trait Implementations

impl RefUnwindSafe for Bar

impl Send for Bar

impl Sync for Bar

impl Unpin for Bar

impl UnwindSafe for Bar

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> 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.