pub struct ThreeLineBreakLinePoint {
pub ts_open: i64,
pub ts_close: i64,
pub open: f64,
pub close: f64,
pub volume: f64,
pub direction: u8,
}Expand description
One Three Line Break line (san-sen-ashi).
Unlike Renko, a TLB line is NOT fixed-height: its height equals the price move that caused it to print. The key invariant is the direction relative to the recent N lines (default N=3), not a fixed box size.
direction: 0 = up, 1 = down.
ts_open / ts_close: millisecond timestamps of the first and
last trade that contributed to the line.
volume: sum of trade volumes that formed the line.
48-byte fixed record (LE): i64 ts_open (8 B) i64 ts_close (8 B) f64 open (8 B) f64 close (8 B) f64 volume (8 B) u8 direction (1 B) — 0=up, 1=down 7 bytes reserved
Fields§
§ts_open: i64§ts_close: i64§open: f64Price at which the line opened (= previous line’s close).
close: f64Price at which the line closed (= the trade price that triggered the line).
volume: f64Summed trade volume during the line.
direction: u80 = up line (close > open), 1 = down line (close < open).
Trait Implementations§
Source§impl Clone for ThreeLineBreakLinePoint
impl Clone for ThreeLineBreakLinePoint
Source§fn clone(&self) -> ThreeLineBreakLinePoint
fn clone(&self) -> ThreeLineBreakLinePoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl DataPoint for ThreeLineBreakLinePoint
impl DataPoint for ThreeLineBreakLinePoint
Source§const RECORD_SIZE: usize = SIZE
const RECORD_SIZE: usize = SIZE
Source§fn encode(&self, out: &mut [u8])
fn encode(&self, out: &mut [u8])
self to a fixed-size buffer (little-endian). Read moreSource§fn decode(bytes: &[u8]) -> Option<Self>
fn decode(bytes: &[u8]) -> Option<Self>
Source§fn timestamp_ms(&self) -> i64
fn timestamp_ms(&self) -> i64
Source§fn from_stream_event(_ev: &StreamEvent) -> Option<Self>
fn from_stream_event(_ev: &StreamEvent) -> Option<Self>
Self from a raw WS StreamEvent. Returns None if the
event doesn’t carry data for this class.Source§fn encode_blob(&self) -> Option<Vec<u8>>
fn encode_blob(&self) -> Option<Vec<u8>>
.blob file. Read more