Struct yata::indicators::RelativeStrengthIndex [−][src]
pub struct RelativeStrengthIndex<M: MovingAverageConstructor = MA> {
pub ma: M,
pub zone: ValueType,
pub source: Source,
}
Expand description
Relative Strength Index
Links:
1 value
main
value
Range in [0.0
; 1.0
]
2 signals
- Signal #1 on enters over-zone.
When main value crosses upper zone upwards, returns full sell signal. When main value crosses lower zone downwards, returns full buy signal. Otherwise returns no signal.
- Signal #2 on leaves over-zone.
When main value crosses upper zone downwards, returns full sell signal. When main value crosses lower zone upwards, returns full buy signal. Otherwise returns no signal.
Fields
ma: M
zone: ValueType
Overbought/oversell relative zone. Default is 0.3
.
Range in (0.0
; 0.5
]
source: Source
Source type of values. Default is Close
Trait Implementations
impl<'de, M: MovingAverageConstructor> Deserialize<'de> for RelativeStrengthIndex<M> where
M: Deserialize<'de>,
impl<'de, M: MovingAverageConstructor> Deserialize<'de> for RelativeStrengthIndex<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 = RelativeStrengthIndexInstance<M>
type Instance = RelativeStrengthIndexInstance<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 RelativeStrengthIndex<M> where
M: RefUnwindSafe,
impl<M> Send for RelativeStrengthIndex<M> where
M: Send,
impl<M> Sync for RelativeStrengthIndex<M> where
M: Sync,
impl<M> Unpin for RelativeStrengthIndex<M> where
M: Unpin,
impl<M> UnwindSafe for RelativeStrengthIndex<M> where
M: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more