Struct yata::indicators::StochasticOscillator [−][src]
pub struct StochasticOscillator { pub period: PeriodType, pub smooth_k: PeriodType, pub method_k: RegularMethods, pub smooth_d: PeriodType, pub method_d: RegularMethods, pub zone: ValueType, }
Expand description
Stochastic Oscillator
Links
2 values
main
value
Range in [0.0
; 1.0
].
signal line
value
Range in [0.0
; 1.0
].
3 signals
- Signal #1
When main
value crosses lower bound upwards, returns full buy signal.
When main
value crosses upper bound downwards, returns full sell signal.
Otherwise returns no signal.
- Signal #2
When signal line
value crosses lower bound upwards, returns full buy signal.
When signal line
value crosses upper bound downwards, returns full sell signal.
Otherwise returns no signal.
- Signal #3
When main
value crosses signal line
upwards, returns full buy signal.
When main
value crosses signal line
downwards, returns full sell signal.
Otherwise returns no signal.
Fields
period: PeriodType
Period for searching highest high and lowest low. Default is 14
.
Range in [2
; PeriodType::MAX
)
smooth_k: PeriodType
Period for smoothing main
value. Default is 14
.
Usually it is equal to period
.
Range in [2
; PeriodType::MAX
)
method_k: RegularMethods
MA method for smoothing main
value. Default is SMA
.
smooth_d: PeriodType
Period for smoothing signal line
value. Default is 3
.
Range in [2
; PeriodType::MAX
)
method_d: RegularMethods
MA method for smoothing signal line
value. Default is SMA
.
zone: ValueType
Zone size for #1 and #2 signals.
Range in [0.0
; 0.5
].
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
type Instance = StochasticOscillatorInstance
type Instance = StochasticOscillatorInstance
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 StochasticOscillator
impl Send for StochasticOscillator
impl Sync for StochasticOscillator
impl Unpin for StochasticOscillator
impl UnwindSafe for StochasticOscillator
Blanket Implementations
Mutably borrows from an owned value. Read more