Struct yata::indicators::FisherTransform
source · pub struct FisherTransform<M: MovingAverageConstructor = MA> {
pub period1: PeriodType,
pub zone: ValueType,
pub signal: M,
pub source: Source,
}
Expand description
Fisher transform
§Links
- https://en.wikipedia.org/wiki/Fisher_transformation
- https://www.investopedia.com/terms/f/fisher-transform.asp
§2 values
- FT
main value
Range in (-inf
; +inf
).
signal value
line
Range in (-inf
; +inf
).
§2 signals
- Signal 1 appears when
main value
crosses zero line. Whenmain value
changes direction, returns signal corresponds to relative position ofmain value
inzone
- Signal 2 appears when
main value
crossessignal line
and after signal 1 appears
Fields§
§period1: PeriodType
Main period for max/min values calculation. Default is 9
.
Range in [2
; PeriodType::MAX
).
zone: ValueType
Zone size for signals. Default is 1.5
.
Range in (0.0
; +inf
)
signal: M
§source: Source
Source type of values. Default is TP
Trait Implementations§
source§impl<M: Clone + MovingAverageConstructor> Clone for FisherTransform<M>
impl<M: Clone + MovingAverageConstructor> Clone for FisherTransform<M>
source§fn clone(&self) -> FisherTransform<M>
fn clone(&self) -> FisherTransform<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 FisherTransform<M>
impl<M: Debug + MovingAverageConstructor> Debug for FisherTransform<M>
source§impl Default for FisherTransform<MA>
impl Default for FisherTransform<MA>
source§impl<'de, M> Deserialize<'de> for FisherTransform<M>where
M: Deserialize<'de> + MovingAverageConstructor,
impl<'de, M> Deserialize<'de> for FisherTransform<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 FisherTransform<M>
impl<M: MovingAverageConstructor> IndicatorConfig for FisherTransform<M>
§type Instance = FisherTransformInstance<M>
type Instance = FisherTransformInstance<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 FisherTransform<M>where
M: Serialize + MovingAverageConstructor,
impl<M> Serialize for FisherTransform<M>where
M: Serialize + MovingAverageConstructor,
impl<M: Copy + MovingAverageConstructor> Copy for FisherTransform<M>
Auto Trait Implementations§
impl<M> RefUnwindSafe for FisherTransform<M>where
M: RefUnwindSafe,
impl<M> Send for FisherTransform<M>where
M: Send,
impl<M> Sync for FisherTransform<M>where
M: Sync,
impl<M> Unpin for FisherTransform<M>where
M: Unpin,
impl<M> UnwindSafe for FisherTransform<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, 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