OPEN-SOURCE SCRIPT
Actualizado Fisher Transform Turning Points [RC Tools]

RC Tools — Fisher Transform Turning Points
────────────────────────────────────────────────────────────────────
█ OVERVIEW
Most oscillators produce a roughly bell-curve distribution of values, which means they spend a lot of time hovering near their own extremes without committing one way or the other — turning points end up gradual and easy to miss. The Fisher Transform, developed by John Ehlers, fixes this by re-shaping the distribution itself: it converts a naturally Gaussian-ish read into one with much sharper, more decisive swings, so genuine turning points stand out rather than blur together.
█ WHAT IT DOES
Computes the Fisher Transform of price's position within its recent high/low range and classifies each confirmed bar as Bullish or Bearish on a zero-line crossover. Plots a 4-colour momentum histogram (Expansion, Slowdown, Contraction, Recovery) showing not just direction but whether momentum is accelerating or fading, colours the chart background by the confirmed state, and shows a table with the current state, how long price has been in it, and historical base rates (average forward return and win rate) for each state.
█ THE THEORY BEHIND IT
Most price-derived oscillators (RSI, Stochastic, and similar) are bounded and tend to spend a disproportionate amount of time in the middle of their range, with actual extremes reached only briefly. Ehlers' insight was that if you first normalise price's position within its recent range to roughly -1 to +1, then run that through the inverse hyperbolic tangent function, you get an output whose distribution is much closer to genuinely Gaussian — which sounds abstract, but has a very practical effect: the statistic moves through its extremes quickly rather than lingering, producing sharper, more decisive turning points instead of a gradual roll-over.
█ HOW IT IS CALCULATED
1. Normalise price's position within its recent high/low range (over the Length window) to roughly -1 to +1, damped against the prior bar's reading to reduce noise.
2. Run that normalised value through 0.5 × ln((1 + x) / (1 - x)) — the inverse hyperbolic tangent, via a standard logarithmic identity — again damped against the prior output.
3. The resulting Fish value crossing above zero is classified Bullish; crossing below zero is classified Bearish. Between crossovers, the classification holds.
4. Separately, a 4-colour momentum state (Expansion/Slowdown/Contraction/Recovery) is derived from Fish's bar-to-bar change — this is a cosmetic diagnostic layer and does not affect the Bullish/Bearish classification itself.
Note: a trigger-line crossover (Fish against its own lagged value) was tested during development and found too whipsaw-prone for this technique — the zero-line crossover used here produced meaningfully cleaner classification.
Classification occurs ONLY on confirmed bar close — the plotted Fish value, the background colour and the table all update together, so nothing here can disagree mid-bar or flip back and forth as the current bar forms.
█ SETTINGS & CONFIGURATION
• Length (default 10, the classical value from Ehlers' original publication) — the rolling high/low window used for the price-position read
• Table visibility, position and colours are fully configurable; the main-chart background painting can be toggled off if you only want the statistics pane
• Forward Return Window (default 20 bars) — the horizon used for the base-rate table
█ HOW TO USE IT
Use it as a turning-point filter alongside your existing tools, not as a standalone entry signal. Because the transform is specifically built to sharpen turning points, it tends to react faster than smoother oscillators — useful for catching a genuine reversal early, at the cost of more false starts in choppy conditions. Check the base-rate table's sample count before treating any single state as meaningfully predictive.
Works on any asset and timeframe with sufficient history for the Length window.
█ LIMITATIONS
• Fisher Transform is a NORMALISED price-position statistic, not a measure of trend strength or magnitude. Any use of it as a precision reversal forecast is a misuse.
• The sharp, decisive turning points that make this technique distinctive also mean it can whipsaw in genuinely choppy, range-bound conditions.
• The high/low window resets its frame of reference every Length bars; a short length reacts fast but is noisier, a long length is smoother but slower to reflect a genuine change.
• The 4-colour momentum state is a cosmetic diagnostic layered on top of Fish's bar-to-bar change — it does not affect the Bullish/Bearish classification or the base-rate table.
• Historical base-rate stats need a meaningful sample count (check N) before being trusted.
• This script does NOT repaint. All classification updates on confirmed bar close only.
█ DISCLAIMER
For educational and informational purposes only. Nothing here is financial advice. Past behaviour of any turning-point state does not indicate future results. Trade at your own risk.
────────────────────────────────────────────────────────────────────
█ OVERVIEW
Most oscillators produce a roughly bell-curve distribution of values, which means they spend a lot of time hovering near their own extremes without committing one way or the other — turning points end up gradual and easy to miss. The Fisher Transform, developed by John Ehlers, fixes this by re-shaping the distribution itself: it converts a naturally Gaussian-ish read into one with much sharper, more decisive swings, so genuine turning points stand out rather than blur together.
█ WHAT IT DOES
Computes the Fisher Transform of price's position within its recent high/low range and classifies each confirmed bar as Bullish or Bearish on a zero-line crossover. Plots a 4-colour momentum histogram (Expansion, Slowdown, Contraction, Recovery) showing not just direction but whether momentum is accelerating or fading, colours the chart background by the confirmed state, and shows a table with the current state, how long price has been in it, and historical base rates (average forward return and win rate) for each state.
█ THE THEORY BEHIND IT
Most price-derived oscillators (RSI, Stochastic, and similar) are bounded and tend to spend a disproportionate amount of time in the middle of their range, with actual extremes reached only briefly. Ehlers' insight was that if you first normalise price's position within its recent range to roughly -1 to +1, then run that through the inverse hyperbolic tangent function, you get an output whose distribution is much closer to genuinely Gaussian — which sounds abstract, but has a very practical effect: the statistic moves through its extremes quickly rather than lingering, producing sharper, more decisive turning points instead of a gradual roll-over.
█ HOW IT IS CALCULATED
1. Normalise price's position within its recent high/low range (over the Length window) to roughly -1 to +1, damped against the prior bar's reading to reduce noise.
2. Run that normalised value through 0.5 × ln((1 + x) / (1 - x)) — the inverse hyperbolic tangent, via a standard logarithmic identity — again damped against the prior output.
3. The resulting Fish value crossing above zero is classified Bullish; crossing below zero is classified Bearish. Between crossovers, the classification holds.
4. Separately, a 4-colour momentum state (Expansion/Slowdown/Contraction/Recovery) is derived from Fish's bar-to-bar change — this is a cosmetic diagnostic layer and does not affect the Bullish/Bearish classification itself.
Note: a trigger-line crossover (Fish against its own lagged value) was tested during development and found too whipsaw-prone for this technique — the zero-line crossover used here produced meaningfully cleaner classification.
Classification occurs ONLY on confirmed bar close — the plotted Fish value, the background colour and the table all update together, so nothing here can disagree mid-bar or flip back and forth as the current bar forms.
█ SETTINGS & CONFIGURATION
• Length (default 10, the classical value from Ehlers' original publication) — the rolling high/low window used for the price-position read
• Table visibility, position and colours are fully configurable; the main-chart background painting can be toggled off if you only want the statistics pane
• Forward Return Window (default 20 bars) — the horizon used for the base-rate table
█ HOW TO USE IT
Use it as a turning-point filter alongside your existing tools, not as a standalone entry signal. Because the transform is specifically built to sharpen turning points, it tends to react faster than smoother oscillators — useful for catching a genuine reversal early, at the cost of more false starts in choppy conditions. Check the base-rate table's sample count before treating any single state as meaningfully predictive.
Works on any asset and timeframe with sufficient history for the Length window.
█ LIMITATIONS
• Fisher Transform is a NORMALISED price-position statistic, not a measure of trend strength or magnitude. Any use of it as a precision reversal forecast is a misuse.
• The sharp, decisive turning points that make this technique distinctive also mean it can whipsaw in genuinely choppy, range-bound conditions.
• The high/low window resets its frame of reference every Length bars; a short length reacts fast but is noisier, a long length is smoother but slower to reflect a genuine change.
• The 4-colour momentum state is a cosmetic diagnostic layered on top of Fish's bar-to-bar change — it does not affect the Bullish/Bearish classification or the base-rate table.
• Historical base-rate stats need a meaningful sample count (check N) before being trusted.
• This script does NOT repaint. All classification updates on confirmed bar close only.
█ DISCLAIMER
For educational and informational purposes only. Nothing here is financial advice. Past behaviour of any turning-point state does not indicate future results. Trade at your own risk.
Notas de prensa
Removed Performance TableScript de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.