pub struct OpeningRangeBreakout { /* private fields */ }Expand description
Opening Range Breakout (ORB) indicator.
Tracks the high and low established over the first range_bars bars of each session
and generates directional breakout signals with 0.5x and 1.0x range extension targets.
Implementations§
Source§impl OpeningRangeBreakout
impl OpeningRangeBreakout
Sourcepub fn new(range_bars: usize) -> Self
pub fn new(range_bars: usize) -> Self
Creates a new OpeningRangeBreakout with the specified number of opening bars.
If range_bars == 0, it defaults to 1.
Sourcepub fn try_new(range_bars: usize) -> Result<Self, SessionLevelsError>
pub fn try_new(range_bars: usize) -> Result<Self, SessionLevelsError>
Try to create a new OpeningRangeBreakout, returning an error if range_bars == 0.
Sourcepub fn with_max_session_bars(self, max_bars: usize) -> Self
pub fn with_max_session_bars(self, max_bars: usize) -> Self
Sets an optional session bar cap after which the indicator transitions to OrbPhase::Closed.
Sourcepub fn range_bars(&self) -> usize
pub fn range_bars(&self) -> usize
Number of bars comprising the opening range window.
Sourcepub fn max_session_bars(&self) -> Option<usize>
pub fn max_session_bars(&self) -> Option<usize>
Optional session bar cap.
Sourcepub fn close_session(&mut self)
pub fn close_session(&mut self)
Manually closes the active session.
Trait Implementations§
Source§impl Clone for OpeningRangeBreakout
impl Clone for OpeningRangeBreakout
Source§impl Debug for OpeningRangeBreakout
impl Debug for OpeningRangeBreakout
Source§impl Default for OpeningRangeBreakout
impl Default for OpeningRangeBreakout
Source§impl<'de> Deserialize<'de> for OpeningRangeBreakout
impl<'de> Deserialize<'de> for OpeningRangeBreakout
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 Next<(f64, f64, f64, bool)> for OpeningRangeBreakout
impl Next<(f64, f64, f64, bool)> for OpeningRangeBreakout
Source§impl Next<OrbInput> for OpeningRangeBreakout
impl Next<OrbInput> for OpeningRangeBreakout
Source§impl PartialEq for OpeningRangeBreakout
impl PartialEq for OpeningRangeBreakout
Source§impl Serialize for OpeningRangeBreakout
impl Serialize for OpeningRangeBreakout
impl StructuralPartialEq for OpeningRangeBreakout
Auto Trait Implementations§
impl Forget for OpeningRangeBreakout
impl Freeze for OpeningRangeBreakout
impl Move for OpeningRangeBreakout
impl RefUnwindSafe for OpeningRangeBreakout
impl Send for OpeningRangeBreakout
impl Sync for OpeningRangeBreakout
impl Unpin for OpeningRangeBreakout
impl UnsafeUnpin for OpeningRangeBreakout
impl UnwindSafe for OpeningRangeBreakout
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.