Struct yata::indicators::Envelopes [−][src]
pub struct Envelopes<M: MovingAverageConstructor = MA> {
pub ma: M,
pub k: ValueType,
pub source: Source,
pub source2: Source,
}
Expand description
Envelopes
Links
3 values
Upper bound
Range of values is the same as the range of the source
values.
Lower bound
Range of values is the same as the range of the source
values.Action
- Raw
Source2
value
1 signal
- Signal 1 appears when
Source2
value crosses bounds. WhenSource2
value crossesupper bound
upwards, returns full sell signal. WhenSource2
value crosseslower bound
downwards, returns full buy signal.
Fields
ma: M
k: ValueType
Bound relative size. Default is 0.1
.
Range in (0.0
; +inf
).
source: Source
Source value type for bounds. Default is Close
.
source2: Source
Source2 value type for actual price. Default is Close
.
Trait Implementations
impl<'de, M: MovingAverageConstructor> Deserialize<'de> for Envelopes<M> where
M: Deserialize<'de>,
impl<'de, M: MovingAverageConstructor> Deserialize<'de> for Envelopes<M> where
M: Deserialize<'de>,
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 = EnvelopesInstance<M>
type Instance = EnvelopesInstance<M>
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<M> RefUnwindSafe for Envelopes<M> where
M: RefUnwindSafe,
impl<M> UnwindSafe for Envelopes<M> where
M: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more