pub struct BollingerBandsValues {
pub upper: f64,
pub middle: f64,
pub lower: f64,
pub width: f64,
pub width_percentile: f64,
pub percent_b: f64,
pub std_dev: f64,
}Expand description
Bollinger Bands output values
Fields§
§upper: f64Upper band (SMA + n * σ)
middle: f64Middle band (SMA)
lower: f64Lower band (SMA - n * σ)
width: f64Band width as percentage of price
width_percentile: f64Where current width ranks historically (0–100 percentile)
percent_b: f64Where price is within the bands (0.0 = lower, 1.0 = upper)
std_dev: f64Standard deviation of prices
Implementations§
Source§impl BollingerBandsValues
impl BollingerBandsValues
Sourcepub fn is_overbought(&self) -> bool
pub fn is_overbought(&self) -> bool
Is price overbought (near or above upper band)?
Sourcepub fn is_oversold(&self) -> bool
pub fn is_oversold(&self) -> bool
Is price oversold (near or below lower band)?
Sourcepub fn is_high_volatility(&self, threshold_percentile: f64) -> bool
pub fn is_high_volatility(&self, threshold_percentile: f64) -> bool
Are bands wide (high volatility)?
Sourcepub fn is_squeeze(&self, threshold_percentile: f64) -> bool
pub fn is_squeeze(&self, threshold_percentile: f64) -> bool
Are bands narrow (potential breakout coming)?
Trait Implementations§
Source§impl Clone for BollingerBandsValues
impl Clone for BollingerBandsValues
Source§fn clone(&self) -> BollingerBandsValues
fn clone(&self) -> BollingerBandsValues
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BollingerBandsValues
impl Debug for BollingerBandsValues
impl Copy for BollingerBandsValues
Auto Trait Implementations§
impl Freeze for BollingerBandsValues
impl RefUnwindSafe for BollingerBandsValues
impl Send for BollingerBandsValues
impl Sync for BollingerBandsValues
impl Unpin for BollingerBandsValues
impl UnsafeUnpin for BollingerBandsValues
impl UnwindSafe for BollingerBandsValues
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