Struct yata::indicators::RelativeStrengthIndex [−][src]
pub struct RelativeStrengthIndex { pub period: PeriodType, pub zone: ValueType, pub source: Source, pub method: RegularMethods, }
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
period: PeriodType
Main period type. Default is 14
.
Range in [3
; PeriodType::MAX
)
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
method: RegularMethods
Moving average method. Default is EMA
.
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 = RelativeStrengthIndexInstance
type Instance = RelativeStrengthIndexInstance
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 RelativeStrengthIndex
impl Send for RelativeStrengthIndex
impl Sync for RelativeStrengthIndex
impl Unpin for RelativeStrengthIndex
impl UnwindSafe for RelativeStrengthIndex
Blanket Implementations
Mutably borrows from an owned value. Read more