Struct yata::indicators::ParabolicSAR
source · pub struct ParabolicSAR {
pub af_step: ValueType,
pub af_max: ValueType,
}
Expand description
Parabolic Stop And Reverse
§Links
§2 values
SAR
value
Range of values is the same as the range of the timeseries values.
trend
value
Can be one of the next values: {-1.0
; 0.0
; 1.0
}
§1 signal
- When
trend
changes it’s value to positive, then returns full buy signal. Whentrend
changes it’s value to negative, then returns full sell signal. Otherwise returns no signal.
Fields§
§af_step: ValueType
§af_max: ValueType
Trait Implementations§
source§impl Clone for ParabolicSAR
impl Clone for ParabolicSAR
source§fn clone(&self) -> ParabolicSAR
fn clone(&self) -> ParabolicSAR
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 ParabolicSAR
impl Debug for ParabolicSAR
source§impl Default for ParabolicSAR
impl Default for ParabolicSAR
source§impl<'de> Deserialize<'de> for ParabolicSAR
impl<'de> Deserialize<'de> for ParabolicSAR
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 ParabolicSAR
impl IndicatorConfig for ParabolicSAR
§type Instance = ParabolicSARInstance
type Instance = ParabolicSARInstance
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 ParabolicSAR
impl Serialize for ParabolicSAR
impl Copy for ParabolicSAR
Auto Trait Implementations§
impl RefUnwindSafe for ParabolicSAR
impl Send for ParabolicSAR
impl Sync for ParabolicSAR
impl Unpin for ParabolicSAR
impl UnwindSafe for ParabolicSAR
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