pub struct TrendLine {
pub start: (i64, f64),
pub end: (i64, f64),
}Expand description
A two-point price line, usable to project a value at any timestamp.
Fields§
§start: (i64, f64)§end: (i64, f64)Implementations§
Source§impl TrendLine
impl TrendLine
pub fn from_nodes(a: &ZigZagNode, b: &ZigZagNode) -> Self
pub fn slope(&self) -> f64
pub fn value_at(&self, timestamp: i64) -> f64
Trait Implementations§
impl Copy for TrendLine
impl StructuralPartialEq for TrendLine
Auto Trait Implementations§
impl Freeze for TrendLine
impl RefUnwindSafe for TrendLine
impl Send for TrendLine
impl Sync for TrendLine
impl Unpin for TrendLine
impl UnsafeUnpin for TrendLine
impl UnwindSafe for TrendLine
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