pub struct FisherTransform { /* private fields */ }Expand description
Fisher Transform of the median price, smoothed, with a signal and a context line.
Over the last fish_len values of (high + low) / 2, both recursions starting at 0:
v = clamp(0.66 * ((x - lowest) / (highest - lowest) - 0.5) + 0.67 * v_prev, -0.999, 0.999)
fish = 0.5 * ln((1 + v) / (1 - v)) + 0.5 * fish_prev(the normalised term is 0 for a flat window). value is the line, Ema(avg_len) of fish
with the first-sample seed; extra["signal"] is Ema(sig_len) of the line. The registry fixes
avg_len = 2 and sig_len = 3 and reads only fish_len.
First output: with the fish_len-th bar. Indicator::reset clears windows, recursions and
averages.
Implementations§
Trait Implementations§
Source§impl Indicator for FisherTransform
impl Indicator for FisherTransform
fn name(&self) -> &str
fn warmup_period(&self) -> usize
fn on_bar(&mut self, bar: &Bar) -> Option<IndicatorOutput>
fn reset(&mut self)
fn alerts(&self) -> Vec<IndicatorAlert>
Source§fn on_checked_bar(
&mut self,
bar: &Bar,
) -> Result<Option<IndicatorOutput>, BarValidationError>
fn on_checked_bar( &mut self, bar: &Bar, ) -> Result<Option<IndicatorOutput>, BarValidationError>
Validates a bar before forwarding it to
Indicator::on_bar.Auto Trait Implementations§
impl Freeze for FisherTransform
impl RefUnwindSafe for FisherTransform
impl Send for FisherTransform
impl Sync for FisherTransform
impl Unpin for FisherTransform
impl UnsafeUnpin for FisherTransform
impl UnwindSafe for FisherTransform
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