Fisher Transform — squash the position of hl2 inside its recent range into
-1..1, then run it through the inverse hyperbolic tangent so the tails
stretch out and turning points become sharp.
Two recursions, each carrying two thirds / one half of the previous bar. The
clamp to +/-0.999 is not cosmetic: at exactly +/-1 the log blows up, so the
the reference round_ is what keeps the series finite. Both recursions read the
previous bar through nz, so a missing previous value counts as 0 — which
happens on the first printed bar and again after any bar that produced na.
A flat window (high_ == low_) is not one of those: the range divide is
floored at 0.001, so the ratio is 0, the bar still prints, and both
recursions carry on.
Trigger is simply fish1[1], so it lags Fisher by exactly one bar.
Fisher Transform — squash the position of
hl2inside its recent range into -1..1, then run it through the inverse hyperbolic tangent so the tails stretch out and turning points become sharp.Two recursions, each carrying two thirds / one half of the previous bar. The clamp to +/-0.999 is not cosmetic: at exactly +/-1 the log blows up, so the the reference
round_is what keeps the series finite. Both recursions read the previous bar throughnz, so a missing previous value counts as 0 — which happens on the first printed bar and again after any bar that producedna. A flat window (high_ == low_) is not one of those: the range divide is floored at 0.001, so the ratio is 0, the bar still prints, and both recursions carry on.Triggeris simplyfish1[1], so it lags Fisher by exactly one bar.