pub struct BarRangeStdDev { /* private fields */ }Expand description
Bar Range Standard Deviation — the population standard deviation of the
high - low range over the last period bars.
This measures how consistent bar sizes are. A low value indicates uniform range (orderly market); a high value indicates range is erratic.
Returns SignalValue::Unavailable until period bars have been seen.
§Example
use fin_primitives::signals::indicators::BarRangeStdDev;
use fin_primitives::signals::Signal;
let brsd = BarRangeStdDev::new("brsd", 20).unwrap();
assert_eq!(brsd.period(), 20);Implementations§
Trait Implementations§
Source§impl Signal for BarRangeStdDev
impl Signal for BarRangeStdDev
Source§fn period(&self) -> usize
fn period(&self) -> usize
Returns the number of bars required before the signal produces a value.
Source§fn is_ready(&self) -> bool
fn is_ready(&self) -> bool
Returns
true if the signal has accumulated enough bars to produce a value.Source§fn reset(&mut self)
fn reset(&mut self)
Resets the signal to its initial state as if no bars had been seen. Read more
Source§fn update_bar(&mut self, bar: &OhlcvBar) -> Result<SignalValue, FinError>
fn update_bar(&mut self, bar: &OhlcvBar) -> Result<SignalValue, FinError>
Auto Trait Implementations§
impl Freeze for BarRangeStdDev
impl RefUnwindSafe for BarRangeStdDev
impl Send for BarRangeStdDev
impl Sync for BarRangeStdDev
impl Unpin for BarRangeStdDev
impl UnsafeUnpin for BarRangeStdDev
impl UnwindSafe for BarRangeStdDev
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