OPEN-SOURCE SCRIPT

Fisher Transform with Divergences by Santiago Rebello

406
### Concept & Purpose
This indicator is a advanced volatility-normalized momentum oscillator that merges J.F. Ehlers' classic Fisher Transform formula with an automated multi-type structural divergence engine. It aims to isolate structural market turning points by tracking momentum shifts before they reflect in linear price bars.

### How It Works (Components & Logic)
To maintain complete clarity and pass library publishing guidelines, here is the technical logic:
1. **Gaussian Data Normalization:** The script samples the median price (HL2) over a user-defined lookback length. It normalizes this range to sit tightly between -0.999 and 0.999 using an index clipping function.
2. **The Fisher Transform:** It converts this normalized data into a probability density function ($IFish = 0.5 \cdot \ln(\frac{1 + v}{1 - v})$). This converts smooth, rounded momentum curves into razor-sharp peaks and valleys, removing traditional lagging signals found in standard indicators.
3. **Automated Divergence Scanning:** The script maps price structures against the Fisher peaks using global-scope pivot point arrays.

### How to Trade This Script
* **Regular Bullish Divergence (Bull Reg):** Price creates a lower low, but the Fisher Transform creates a higher low. This indicates selling pressure is structurally exhausted. Look for a long entry as Fisher hooks upwards.
* **Hidden Bullish Divergence (Bull Hid):** Price creates a higher low, but the Fisher Transform creates a lower low. This signifies trend continuation; momentum is loading up for another push higher.
* **Regular Bearish Divergence (Bear Reg):** Price marks a higher high, but the Fisher Transform creates a lower high. Look for trend exhaustion shorts.
* **Hidden Bearish Divergence (Bear Hid):** Price marks a lower high, but Fisher marks a higher high. Signifies a strong trend continuation short setup.

### Settings & Optimization Notes
* **Pivot Left/Right:** Adjust these settings to increase or decrease the structural validation filter. Higher numbers result in fewer, more reliable long-term macro divergence lines. Lower numbers are optimal for short-term scalping structures.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.