pub struct ADXState {Show 13 fields
pub config: ADXConfig,
pub previous_high: Option<f64>,
pub previous_low: Option<f64>,
pub previous_close: Option<f64>,
pub period_data: VecDeque<ADXPeriodData>,
pub smoothed_tr: Option<f64>,
pub smoothed_plus_dm: Option<f64>,
pub smoothed_minus_dm: Option<f64>,
pub dx_history: VecDeque<f64>,
pub current_adx: Option<f64>,
pub has_di_data: bool,
pub has_adx_data: bool,
pub is_first: bool,
}Expand description
ADX calculation state
Fields§
§config: ADXConfigConfiguration
previous_high: Option<f64>Previous high (for DM calculation)
previous_low: Option<f64>Previous low (for DM calculation)
previous_close: Option<f64>Previous close (for TR calculation)
period_data: VecDeque<ADXPeriodData>History of period data for smoothing
smoothed_tr: Option<f64>Smoothed True Range sum
smoothed_plus_dm: Option<f64>Smoothed Plus DM sum
smoothed_minus_dm: Option<f64>Smoothed Minus DM sum
dx_history: VecDeque<f64>History of DX values for ADX calculation
current_adx: Option<f64>Current ADX value (for smoothing)
has_di_data: boolWhether we have enough data for DI calculation
has_adx_data: boolWhether we have enough data for ADX calculation
is_first: boolIs first calculation
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ADXState
impl<'de> Deserialize<'de> for ADXState
Source§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
impl StructuralPartialEq for ADXState
Auto Trait Implementations§
impl Freeze for ADXState
impl RefUnwindSafe for ADXState
impl Send for ADXState
impl Sync for ADXState
impl Unpin for ADXState
impl UnwindSafe for ADXState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more