pub struct OrderBlockZone {
pub id: u64,
pub block_type: OrderBlockType,
pub bar_index: usize,
pub trigger_bar: usize,
pub open: f64,
pub high: f64,
pub low: f64,
pub close: f64,
pub zone_high: f64,
pub zone_low: f64,
pub mitigation: MitigationStatus,
pub mitigation_bar: Option<usize>,
}Expand description
Structural representation of an identified Order Block.
Fields§
§id: u64Monotonically increasing unique ID.
block_type: OrderBlockTypeBullish or Bearish type.
bar_index: usizeBar index of the order block candle (the down/up candle).
trigger_bar: usizeBar index where the breakout candle confirmed the displacement.
open: f64Open price of the order block candle.
high: f64High price of the order block candle.
low: f64Low price of the order block candle.
close: f64Close price of the order block candle.
zone_high: f64Upper price boundary of the zone.
zone_low: f64Lower price boundary of the zone.
mitigation: MitigationStatusMitigation status.
mitigation_bar: Option<usize>Bar index where mitigation occurred (if any).
Implementations§
Source§impl OrderBlockZone
impl OrderBlockZone
pub fn is_unmitigated(&self) -> bool
pub fn is_partially_mitigated(&self) -> bool
pub fn is_fully_mitigated(&self) -> bool
Trait Implementations§
Source§impl Clone for OrderBlockZone
impl Clone for OrderBlockZone
impl Copy for OrderBlockZone
Source§impl Debug for OrderBlockZone
impl Debug for OrderBlockZone
Source§impl<'de> Deserialize<'de> for OrderBlockZone
impl<'de> Deserialize<'de> for OrderBlockZone
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 OrderBlockZone
impl PartialEq for OrderBlockZone
Source§impl Serialize for OrderBlockZone
impl Serialize for OrderBlockZone
impl StructuralPartialEq for OrderBlockZone
Auto Trait Implementations§
impl Forget for OrderBlockZone
impl Freeze for OrderBlockZone
impl Move for OrderBlockZone
impl RefUnwindSafe for OrderBlockZone
impl Send for OrderBlockZone
impl Sync for OrderBlockZone
impl Unpin for OrderBlockZone
impl UnsafeUnpin for OrderBlockZone
impl UnwindSafe for OrderBlockZone
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.