Struct yata::indicators::Aroon
source · pub struct Aroon {
pub period: PeriodType,
pub signal_zone: ValueType,
pub over_zone_period: PeriodType,
}
Expand description
Aroon indicator
§Links
§2 values
AroonUp
Range in [0.0
; 1.0
]
AroonDown
Range in [0.0
; 1.0
]
§3 signals
- When
AroonUp
crossesAroonDown
upwards, gives full positive #0 signal. WhenAroonDown
crossesAroonUp
upwards, gives full negative #0 signal. Otherwise gives no #0 signal. - When
AroonUp
rises up to 1.0, gives full positive #1 signal. WhenAroonDown
rises up to 1.0, gives full negative #1 signal. - Gives positive #2 signal when
AroonUp
stays above(1.0-signal_zone)
andAroonDown
stays undersignal_zone
. Gives negative #2 signal whenAroonDown
stays above(1.0-signal_zone)
andAroonUp
stays undersignal_zone
.
Fields§
§period: PeriodType
main period length. Default is 14
.
Range in [2
; PeriodType::MAX
)
signal_zone: ValueType
zone value determines when signal #2 appears. Default is 0.3
.
Range in [0.0
; 1.0
]
over_zone_period: PeriodType
period until signal #2 appears in full strength. Default is 7
.
Range in [1
; PeriodType::MAX
)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Aroon
impl<'de> Deserialize<'de> for Aroon
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 Aroon
impl IndicatorConfig for Aroon
§type Instance = AroonInstance
type Instance = AroonInstance
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)
impl Copy for Aroon
Auto Trait Implementations§
impl RefUnwindSafe for Aroon
impl Send for Aroon
impl Sync for Aroon
impl Unpin for Aroon
impl UnwindSafe for Aroon
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