pub struct DetrendedPriceOscillator<M: MovingAverageConstructor = MA> {
pub ma: M,
pub source: Source,
}
Expand description
Fields§
§ma: M
§source: Source
Source type. Default is Close
Trait Implementations§
Source§impl<M: Clone + MovingAverageConstructor> Clone for DetrendedPriceOscillator<M>
impl<M: Clone + MovingAverageConstructor> Clone for DetrendedPriceOscillator<M>
Source§fn clone(&self) -> DetrendedPriceOscillator<M>
fn clone(&self) -> DetrendedPriceOscillator<M>
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<M: Debug + MovingAverageConstructor> Debug for DetrendedPriceOscillator<M>
impl<M: Debug + MovingAverageConstructor> Debug for DetrendedPriceOscillator<M>
Source§impl Default for DetrendedPriceOscillator<MA>
impl Default for DetrendedPriceOscillator<MA>
Source§impl<'de, M> Deserialize<'de> for DetrendedPriceOscillator<M>where
M: Deserialize<'de> + MovingAverageConstructor,
impl<'de, M> Deserialize<'de> for DetrendedPriceOscillator<M>where
M: Deserialize<'de> + MovingAverageConstructor,
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<M: MovingAverageConstructor> IndicatorConfig for DetrendedPriceOscillator<M>
impl<M: MovingAverageConstructor> IndicatorConfig for DetrendedPriceOscillator<M>
Source§type Instance = DetrendedPriceOscillatorInstance<M>
type Instance = DetrendedPriceOscillatorInstance<M>
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<M> Serialize for DetrendedPriceOscillator<M>where
M: Serialize + MovingAverageConstructor,
impl<M> Serialize for DetrendedPriceOscillator<M>where
M: Serialize + MovingAverageConstructor,
impl<M: Copy + MovingAverageConstructor> Copy for DetrendedPriceOscillator<M>
Auto Trait Implementations§
impl<M> Freeze for DetrendedPriceOscillator<M>where
M: Freeze,
impl<M> RefUnwindSafe for DetrendedPriceOscillator<M>where
M: RefUnwindSafe,
impl<M> Send for DetrendedPriceOscillator<M>where
M: Send,
impl<M> Sync for DetrendedPriceOscillator<M>where
M: Sync,
impl<M> Unpin for DetrendedPriceOscillator<M>where
M: Unpin,
impl<M> UnwindSafe for DetrendedPriceOscillator<M>where
M: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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