Struct yata::indicators::Trix [−][src]
pub struct Trix<M: MovingAverageConstructor = MA> {
pub period1: PeriodType,
pub signal: M,
pub source: Source,
}
Expand description
TRIX (extended)
Links
2 values
main
value
Range is (-inf
; +inf
)
signal line
value
Range is (-inf
; +inf
)
3 signals
-
When
main
value changes direction upwards, returns full buy signal. Whenmain
value changes direction downwards, returns full sell signal. Otherwise returns no signal. -
When
main
value crossessignal line
value upwards, returns full buy signal. Whenmain
value crossessignal line
value downwards, returns full sell signal. Otherwise returns no signal. -
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.
Fields
period1: PeriodType
TRIX period. Default is 18
.
Range in [3
; PeriodType::MAX
)
signal: M
source: Source
Source type. 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 = TRIXInstance<M>
type Instance = TRIXInstance<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 Trix<M> where
M: RefUnwindSafe,
impl<M> UnwindSafe for Trix<M> where
M: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more