Struct yata::indicators::TrueStrengthIndex [−][src]
pub struct TrueStrengthIndex {
pub period1: PeriodType,
pub period2: PeriodType,
pub period3: PeriodType,
pub zone: ValueType,
pub source: Source,
}
Expand description
True Strength Index
Links
2 values
main
value
Range in [-1.0
; 1.0
]
signal line
value
Range in [-1.0
; 1.0
]
3 signals
- Signal #1.
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. When
main
value crosses zero line upwards, returns full buy signal. Whenmain
value crosses zero line downwards, returns full sell signal. Otherwise returns no signal. -
Signal #3. When
main
value crossessignal line
upwards, returns full buy signal. Whenmain
value crossessignal line
downwards, returns full sell signal. Otherwise returns no signal.
Fields
period1: PeriodType
Long TSI period. Default is 25
.
Range in [period2
, PeriodType::MAX
).
period2: PeriodType
Short TSI period. Default is 13
.
Range in (2
, period1
].
period3: PeriodType
Signal line MA period. Default is 13
.
Range in [2
, PeriodType::MAX
).
zone: ValueType
Signal zone size. Default is 0.25
.
Range in [0.0
; 1.0
]
source: Source
Source type of values. Default is Close
Trait Implementations
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 = TrueStrengthIndexInstance
type Instance = TrueStrengthIndexInstance
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 TrueStrengthIndex
impl Send for TrueStrengthIndex
impl Sync for TrueStrengthIndex
impl Unpin for TrueStrengthIndex
impl UnwindSafe for TrueStrengthIndex
Blanket Implementations
Mutably borrows from an owned value. Read more