OPEN-SOURCE SCRIPT

Inverse Fisher Transform on ADX DI (Directional Acceptance)

185

  1. **Purpose** — Implements an Inverse Fisher Transform (IFT) on the ADX Directional Index spread (plusDI − minusDI) to produce a bounded, smoothed oscillator that highlights directional dominance and makes extreme directional shifts easier to spot.
  2. **Core signal** — Uses the DMI spread as the raw input; positive values indicate upward directional dominance, negative values indicate downward dominance, and the IFT maps those tendencies into a compact \([-1, +1]\) range.
  3. **Normalization** — Normalizes the DI spread over a rolling window (`normLen`) by computing the windowed minimum and maximum, then rescales to \([0,1]\) and remaps to \([-1,1]\) so the IFT receives a stable, comparable input across different instruments and timeframes.
  4. **Clamping for stability** — Clamps the normalized input to \([-0.999, 0.999]\) before applying the exponential-based IFT formula to avoid numerical overflow and to keep the transform well-behaved near the boundaries.
  5. **Inverse Fisher Transform math** — Applies the standard IFT formula \((e^{2x}-1)/(e^{2x}+1)\) which accentuates extremes and compresses mid-range values, improving the visual separation between neutral and strong directional conditions.
  6. **Pre- and final smoothing** — Offers a two-stage smoothing approach: optional pre-smoothing of the normalized input to reduce spikes, followed by a final smoothing (RMA/EMA/WMA) of the IFT output to control responsiveness versus noise.
  7. **Smoothing options** — Supports Wilder RMA for trend stability, EMA for responsiveness, and WMA for weighted recency; this flexibility lets traders tune the indicator to their preferred balance of lag and sensitivity.
  8. **Visual enhancements** — Plots the smoothed IFT line with color coding for positive/negative values, optional histogram columns, horizontal threshold lines (e.g., ±0.5), and a filled area to emphasize the relationship to zero.
  9. **Alerting and signals** — Includes `alertcondition` triggers for crossings of the upper/lower thresholds and zero, enabling automated notifications when directional acceptance shifts materially in either direction.
  10. **Edge-case handling** — Gracefully handles flat normalization windows by returning a neutral midpoint (0.5 normalized) and uses a tiny epsilon-like clamp to avoid division-by-zero or degenerate outputs.
  11. **Tuning guidance** — Recommends larger `normLen` for less sensitivity to short-term swings, smaller smoothing lengths for faster signals, and threshold adjustments per instrument and timeframe to reduce false signals.
  12. **Performance considerations** — Keeps computations lightweight (min/max, simple transforms, standard moving averages) so the script runs efficiently even on lower timeframes or long historical ranges.
  13. **Interpretation tips** — Readings above the upper threshold indicate accepted upward dominance (bullish bias), readings below the lower threshold indicate accepted downward dominance (bearish bias), and zero crossings suggest shifts in directional control.
  14. **Extensions and variants** — Can be extended with percentile-based normalization, multi-timeframe DI inputs, ADX overlay for trend strength context, or adaptive thresholds; these additions can improve robustness but may increase complexity and computation.
  15. **Practical use** — Best used as a directional-confirmation tool alongside price action or trend filters; avoid using it as a lone entry signal on highly mean-reverting instruments without additional confirmation.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.