Struct yata::indicators::HullMovingAverage
source · pub struct HullMovingAverage {
pub period: PeriodType,
pub left: PeriodType,
pub right: PeriodType,
pub source: Source,
}
Expand description
Fields§
§period: PeriodType
HMA period. Default is 9
.
Range in [3
; PeriodType::MAX
).
left: PeriodType
Left lag for reverse point detection. Default is 3
.
Range in [1
; PeriodType::MAX
/2
]
right: PeriodType
Right lag for reverse point detection. Default is 2
.
Range in [1
; PeriodType::MAX
/2
].
source: Source
Source type of values. Default is Close
Trait Implementations§
source§impl Clone for HullMovingAverage
impl Clone for HullMovingAverage
source§fn clone(&self) -> HullMovingAverage
fn clone(&self) -> HullMovingAverage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for HullMovingAverage
impl Debug for HullMovingAverage
source§impl Default for HullMovingAverage
impl Default for HullMovingAverage
source§impl<'de> Deserialize<'de> for HullMovingAverage
impl<'de> Deserialize<'de> for HullMovingAverage
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
source§impl IndicatorConfig for HullMovingAverage
impl IndicatorConfig for HullMovingAverage
§type Instance = HullMovingAverageInstance
type Instance = HullMovingAverageInstance
Type of State
source§fn init<T: OHLCV>(self, candle: &T) -> Result<Self::Instance, Error>
fn init<T: OHLCV>(self, candle: &T) -> Result<Self::Instance, Error>
Initializes the State based on current Configuration
source§fn set(&mut self, name: &str, value: String) -> Result<(), Error>
fn set(&mut self, name: &str, value: String) -> Result<(), Error>
Dynamically sets Configuration parameters
source§fn size(&self) -> (u8, u8)
fn size(&self) -> (u8, u8)
Returns an
IndicatorResult
size processing by the indicator (count of raw values, count of signals)
source§impl Serialize for HullMovingAverage
impl Serialize for HullMovingAverage
impl Copy for HullMovingAverage
Auto Trait Implementations§
impl RefUnwindSafe for HullMovingAverage
impl Send for HullMovingAverage
impl Sync for HullMovingAverage
impl Unpin for HullMovingAverage
impl UnwindSafe for HullMovingAverage
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
source§impl<T, I, C> IndicatorConfigDyn<T> for Cwhere
T: OHLCV,
I: IndicatorInstanceDyn<T> + IndicatorInstance<Config = C> + 'static,
C: IndicatorConfig<Instance = I> + Clone + 'static,
impl<T, I, C> IndicatorConfigDyn<T> for Cwhere
T: OHLCV,
I: IndicatorInstanceDyn<T> + IndicatorInstance<Config = C> + 'static,
C: IndicatorConfig<Instance = I> + Clone + 'static,
source§fn init(
&self,
initial_value: &T
) -> Result<Box<dyn IndicatorInstanceDyn<T>>, Error>
fn init( &self, initial_value: &T ) -> Result<Box<dyn IndicatorInstanceDyn<T>>, Error>
Dynamically initializes the State based on the current Configuration
source§fn over(&self, inputs: &dyn AsRef<[T]>) -> Result<Vec<IndicatorResult>, Error>
fn over(&self, inputs: &dyn AsRef<[T]>) -> Result<Vec<IndicatorResult>, Error>
Evaluates dynamically dispatched
IndicatorConfig
over series of OHLC and returns series of IndicatorResult
s Read more