pub struct ChochState {
pub trend: StructureTrend,
pub last_break: Option<StructureBreakEvent>,
pub last_swing_high: Option<SmcSwingPoint>,
pub last_swing_low: Option<SmcSwingPoint>,
pub bar_index: usize,
}Expand description
Snapshot output of the Market Structure (CHoCH / BOS) detector.
Fields§
§trend: StructureTrendCurrent structural trend bias.
last_break: Option<StructureBreakEvent>Most recent structure break event (if any break has occurred).
last_swing_high: Option<SmcSwingPoint>Most recently confirmed swing high.
last_swing_low: Option<SmcSwingPoint>Most recently confirmed swing low.
bar_index: usizeCurrent bar index.
Implementations§
Source§impl ChochState
impl ChochState
Sourcepub fn current_break(&self) -> Option<StructureBreakEvent>
pub fn current_break(&self) -> Option<StructureBreakEvent>
Returns the break event if one occurred on this exact bar.
pub fn is_bullish(&self) -> bool
pub fn is_bearish(&self) -> bool
Trait Implementations§
Source§impl Clone for ChochState
impl Clone for ChochState
Source§impl Debug for ChochState
impl Debug for ChochState
Source§impl<'de> Deserialize<'de> for ChochState
impl<'de> Deserialize<'de> for ChochState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ChochState
impl PartialEq for ChochState
Source§impl Serialize for ChochState
impl Serialize for ChochState
impl StructuralPartialEq for ChochState
Auto Trait Implementations§
impl Forget for ChochState
impl Freeze for ChochState
impl Move for ChochState
impl RefUnwindSafe for ChochState
impl Send for ChochState
impl Sync for ChochState
impl Unpin for ChochState
impl UnsafeUnpin for ChochState
impl UnwindSafe for ChochState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.