[][src]Struct tdb_core::postprocessing::candle::time_bars::TimeBars

pub struct TimeBars { /* fields omitted */ }

Candles sampled by time, allows rebinning

Methods

impl TimeBars[src]

pub fn get_size(&self) -> usize[src]

Get total length of candles

pub fn get_candles<'a>(&'a self) -> Values<'a, u64, Candle>[src]

Get tick bars as a slice

pub fn get_scale(&self) -> u16[src]

return the scale of candles

pub fn to_csv(&self) -> String[src]

convert TimeBars vector to csv format is T,O,H,L,C,V

pub fn missing_ranges(&self) -> Vec<(u64, u64)>[src]

returns the ranges of missing epochs [60, 120, 280, 360] => [(180, 280)]

pub fn insert_continuation_candles(&mut self)[src]

insert continuation candles and fix missing insert the missing candles based on the previous candle

pub fn rebin(self, align: bool, new_scale: u16) -> Option<TimeBars>[src]

rebin 1 minute candles to candles sampled by new scale

Trait Implementations

impl Clone for TimeBars[src]

impl Debug for TimeBars[src]

impl<'a> From<&'a [Update]> for TimeBars[src]

fn from(ups: &[Update]) -> TimeBars[src]

Generate a vector of 1-min candles from Updates

impl PartialEq<TimeBars> for TimeBars[src]

impl StructuralPartialEq for TimeBars[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> 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,