Struct yata::indicators::BollingerBands [−][src]
pub struct BollingerBands {
pub avg_size: PeriodType,
pub sigma: ValueType,
pub source: Source,
}
Expand description
Bollinger Bands
Links
3 values
upper bound
Range of values is the same as the range of the source
values.
source
valuelower bound
Range of values is the same as the range of the source
values.
1 digital signal
When source
value goes above the upper bound
, then returns full buy signal.
When source
value goes under the lower bound
, then returns full sell signal.
Otherwise returns signal according to relative position of the source
value based on upper bound
and lower bound
values.
Fields
avg_size: PeriodType
Main period length. Default is 20
Range in [3
; PeriodType::MAX
)
sigma: ValueType
Standard deviation multiplier for bounds. Default is 2.0
Range in (0.0
; +inf
)
source: Source
Source type of values. Default is Close
Trait Implementations
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
type Instance = BollingerBandsInstance
type Instance = BollingerBandsInstance
Type of State
Initializes the State based on current Configuration
Dynamically sets Configuration parameters
Returns an IndicatorResult
size processing by the indicator (count of raw values, count of signals)
Creates an IndicatorInstance
function from this IndicatorConfig
.
Auto Trait Implementations
impl RefUnwindSafe for BollingerBands
impl Send for BollingerBands
impl Sync for BollingerBands
impl Unpin for BollingerBands
impl UnwindSafe for BollingerBands
Blanket Implementations
Mutably borrows from an owned value. Read more