pub struct OrbState {
pub phase: OrbPhase,
pub breakout: OrbBreakout,
pub range_high: f64,
pub range_low: f64,
pub range_size: f64,
pub target_1_bull: f64,
pub target_1_bear: f64,
pub target_2_bull: f64,
pub target_2_bear: f64,
pub bar_index: usize,
}Expand description
Output state of the Opening Range Breakout (ORB) indicator.
Fields§
§phase: OrbPhaseCurrent lifecycle phase of the session.
breakout: OrbBreakoutBreakout status evaluated on the current bar close.
range_high: f64Established or in-progress high of the opening range.
range_low: f64Established or in-progress low of the opening range.
range_size: f64Height of the opening range (range_high - range_low).
target_1_bull: f64Bullish extension target 1 (range_high + 0.5 * range_size).
target_1_bear: f64Bearish extension target 1 (range_low - 0.5 * range_size).
target_2_bull: f64Bullish extension target 2 (range_high + 1.0 * range_size).
target_2_bear: f64Bearish extension target 2 (range_low - 1.0 * range_size).
bar_index: usize0-indexed count of bars processed in the current session.
Implementations§
Source§impl OrbState
impl OrbState
Sourcepub const fn is_breakout(&self) -> bool
pub const fn is_breakout(&self) -> bool
Returns true if the bar closed with a breakout in either direction.
Sourcepub fn target_1_reached(&self, price: f64) -> bool
pub fn target_1_reached(&self, price: f64) -> bool
Returns true if target 1 was reached or exceeded by the provided price.
Sourcepub fn target_2_reached(&self, price: f64) -> bool
pub fn target_2_reached(&self, price: f64) -> bool
Returns true if target 2 was reached or exceeded by the provided price.
Trait Implementations§
impl Copy for OrbState
Source§impl<'de> Deserialize<'de> for OrbState
impl<'de> Deserialize<'de> for OrbState
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>,
impl StructuralPartialEq for OrbState
Auto Trait Implementations§
impl Forget for OrbState
impl Freeze for OrbState
impl Move for OrbState
impl RefUnwindSafe for OrbState
impl Send for OrbState
impl Sync for OrbState
impl Unpin for OrbState
impl UnsafeUnpin for OrbState
impl UnwindSafe for OrbState
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
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.