Struct yata::indicators::AverageDirectionalIndex [−][src]
pub struct AverageDirectionalIndex { pub method1: RegularMethods, pub di_length: PeriodType, pub method2: RegularMethods, pub adx_smoothing: PeriodType, pub period1: PeriodType, pub zone: ValueType, }
Expand description
Average Directional Index
Links:
- https://school.stockcharts.com/doku.php?id=technical_indicators:average_directional_index_adx
- https://www.investopedia.com/terms/a/adx.asp
- https://primexbt.com/blog/average-directional-index/
3 values
ADX
Range in [0.0
; 1.0
]
+DI
Range in [0.0
; 1.0
]
-DI
Range in [0.0
; 1.0
]
2 signals
BUY_ALL
whenADX
overzone
and+DI
>-DI
,SELL_ALL
whenADX
overzone
and-DI
>+DI
. Otherwise - no signal.- Digital signal by difference between
+DI
and-DI
Fields
method1: RegularMethods
Default is RMA
di_length: PeriodType
Default is 14
.
Range in (period1
; PeriodType::MAX
)
method2: RegularMethods
Default is RMA
adx_smoothing: PeriodType
Default is 14
Range in (period1
; PeriodType::MAX
)
period1: PeriodType
Default is 1
Range in [1
; min(di_length, adx_smoothing)
)
zone: ValueType
Default is 0.2
Range in [0.0
; 1.0
]
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 = AverageDirectionalIndexInstance
type Instance = AverageDirectionalIndexInstance
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 AverageDirectionalIndex
impl Send for AverageDirectionalIndex
impl Sync for AverageDirectionalIndex
impl Unpin for AverageDirectionalIndex
impl UnwindSafe for AverageDirectionalIndex
Blanket Implementations
Mutably borrows from an owned value. Read more