Struct yata::methods::renko::RenkoBlock
source · pub struct RenkoBlock {
pub open: ValueType,
pub close: ValueType,
pub volume: ValueType,
}
Expand description
Single unit for Renko
charts
May be produced by RenkoOutput
iterator.
Fields§
§open: ValueType
Current block’s open value
close: ValueType
Current block’s close value
volume: ValueType
Average block’s volume value
Implementations§
source§impl RenkoBlock
impl RenkoBlock
sourcepub fn upper_bound(&self) -> ValueType
pub fn upper_bound(&self) -> ValueType
Returns upper bound of the block
sourcepub fn lower_bound(&self) -> ValueType
pub fn lower_bound(&self) -> ValueType
Returns lower bound of the block
Trait Implementations§
source§impl Clone for RenkoBlock
impl Clone for RenkoBlock
source§fn clone(&self) -> RenkoBlock
fn clone(&self) -> RenkoBlock
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RenkoBlock
impl Debug for RenkoBlock
source§impl OHLCV for RenkoBlock
impl OHLCV for RenkoBlock
source§fn tr(&self, prev_candle: &dyn OHLCV) -> ValueType
fn tr(&self, prev_candle: &dyn OHLCV) -> ValueType
Calculates True Range over last two candles Read more
source§fn tr_close(&self, prev_close: ValueType) -> ValueType
fn tr_close(&self, prev_close: ValueType) -> ValueType
Calculates True Range over last two candles using
close
price from the previous candle.source§fn volumed_price(&self) -> ValueType
fn volumed_price(&self) -> ValueType
Volumed price Read more
source§fn is_rising(&self) -> bool
fn is_rising(&self) -> bool
Checks if candle is “rising”: it’s close value greater than open value
source§fn is_falling(&self) -> bool
fn is_falling(&self) -> bool
Checks if candle is “falling”: it’s close value smaller than open value
source§impl PartialEq for RenkoBlock
impl PartialEq for RenkoBlock
source§fn eq(&self, other: &RenkoBlock) -> bool
fn eq(&self, other: &RenkoBlock) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for RenkoBlock
impl StructuralPartialEq for RenkoBlock
Auto Trait Implementations§
impl RefUnwindSafe for RenkoBlock
impl Send for RenkoBlock
impl Sync for RenkoBlock
impl Unpin for RenkoBlock
impl UnwindSafe for RenkoBlock
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more