Struct yata::indicators::RelativeVigorIndex [−][src]
pub struct RelativeVigorIndex<M: MovingAverageConstructor = MA> {
pub period1: PeriodType,
pub period2: PeriodType,
pub signal: M,
pub zone: ValueType,
}
Expand description
Relative Vigor Index
Links:
2 values
main
value
Range in [-0.5
; 0.5
]
signal line
value
Range in [-0.5
; 0.5
]
2 signals
- Signal #1 on
main
value crossessignal line
value.
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.
- Signal #2 on
main
value crossessignal line
value outside safe zone.
When main value is below -zone
and crosses signal line upwards, returns full buy signal.
When main value is above +zone
and crosses signal line downwards, returns full sell signal.
Otherwise returns no signal.
Fields
period1: PeriodType
Summarize period. Default is 10
.
Range in [2
; PeriodType::MAX
)
period2: PeriodType
SWMA period. Default is 4
.
Range in [2
; PeriodType::MAX
)
signal: M
zone: ValueType
Signal zone filter. Default is 0.25
.
Range in [0.0
; 0.5
)
Trait Implementations
impl<'de, M: MovingAverageConstructor> Deserialize<'de> for RelativeVigorIndex<M> where
M: Deserialize<'de>,
impl<'de, M: MovingAverageConstructor> Deserialize<'de> for RelativeVigorIndex<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 = RelativeVigorIndexInstance<M>
type Instance = RelativeVigorIndexInstance<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 RelativeVigorIndex<M> where
M: RefUnwindSafe,
impl<M> Send for RelativeVigorIndex<M> where
M: Send,
impl<M> Sync for RelativeVigorIndex<M> where
M: Sync,
impl<M> Unpin for RelativeVigorIndex<M> where
M: Unpin,
impl<M> UnwindSafe for RelativeVigorIndex<M> where
M: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more