OPEN-SOURCE SCRIPT
HARSI Fisher Transform & Divergence

# HARSI Fisher Transform & Divergence — Publication Description
## Description
This indicator runs a Heikin-Ashi RSI (HARSI) based oscillator through a
single-pole Fisher Transform filter to produce a cleaner, lower-lag turning/
momentum line. HARSI candles are plotted on the same visual scale as the
Fisher line (auto-scaled to volatility), so you can read both the raw HARSI
candles and the smoothed Fisher line in a single pane.
The indicator includes two independent divergence engines — one running on
the Fisher line, the other on the raw HARSI candles. Both engines compare
against real price highs/lows to detect regular (reversal) and hidden
(continuation) bullish/bearish divergence, with an optional maximum
pivot-distance filter and a separate alert condition for every signal type.
## Source Code & Credits
- **HARSI (Heikin-Ashi RSI) calculation** (`f_zrsi`, `f_rsiHeikinAshi`
functions): based on **JayRogers'** open-source **"Heikin Ashi RSI
Oscillator"** (Pine v4) script, ported to Pine v6 for this indicator. See
the original author's TradingView profile for the source script.
- **Fisher Transform concept**: developed by John Ehlers and considered
public domain; this script contains its own continuous, single-pole
implementation of the technique.
## Original Contributions Added In This Version
Beyond the underlying HARSI calculation, the following parts are original
to this script and constitute a significant improvement:
- A continuous single-pole Fisher Transform layer applied to HARSI HL2
- A dual divergence engine running **separately** on the Fisher line and on
the HARSI candle (regular + hidden, bullish + bearish — 8 signal types
total)
- An optional maximum pivot-distance filter to discard stale pivot pairs
and reduce false signals
- Auto-scaling of the HARSI candle body to share the Fisher line's pane
(a `ta.stdev`-based ratio, floored/capped against sudden spikes)
- A dedicated `alertcondition` for every signal type
- Pine v4 → v6 port and general code cleanup
These additions go beyond a minor style or naming change to the HARSI base —
they add an independent layer that extends the indicator's function and
purpose.
## Open-Source Note
This script is **open-source**; because it builds on JayRogers' original
open-source HARSI logic, it is published as open-source rather than
protected/invite-only.
## How to Use
Settings are organized into four groups: HARSI candle settings, Fisher
Transform settings, divergence settings, and display settings. Defaults are
suitable for general use; the pivot left/right bar counts and maximum pivot
distance can be adjusted to tune signal frequency and lag.
*This indicator is for educational and analytical purposes only and does
not constitute investment advice.*
## Description
This indicator runs a Heikin-Ashi RSI (HARSI) based oscillator through a
single-pole Fisher Transform filter to produce a cleaner, lower-lag turning/
momentum line. HARSI candles are plotted on the same visual scale as the
Fisher line (auto-scaled to volatility), so you can read both the raw HARSI
candles and the smoothed Fisher line in a single pane.
The indicator includes two independent divergence engines — one running on
the Fisher line, the other on the raw HARSI candles. Both engines compare
against real price highs/lows to detect regular (reversal) and hidden
(continuation) bullish/bearish divergence, with an optional maximum
pivot-distance filter and a separate alert condition for every signal type.
## Source Code & Credits
- **HARSI (Heikin-Ashi RSI) calculation** (`f_zrsi`, `f_rsiHeikinAshi`
functions): based on **JayRogers'** open-source **"Heikin Ashi RSI
Oscillator"** (Pine v4) script, ported to Pine v6 for this indicator. See
the original author's TradingView profile for the source script.
- **Fisher Transform concept**: developed by John Ehlers and considered
public domain; this script contains its own continuous, single-pole
implementation of the technique.
## Original Contributions Added In This Version
Beyond the underlying HARSI calculation, the following parts are original
to this script and constitute a significant improvement:
- A continuous single-pole Fisher Transform layer applied to HARSI HL2
- A dual divergence engine running **separately** on the Fisher line and on
the HARSI candle (regular + hidden, bullish + bearish — 8 signal types
total)
- An optional maximum pivot-distance filter to discard stale pivot pairs
and reduce false signals
- Auto-scaling of the HARSI candle body to share the Fisher line's pane
(a `ta.stdev`-based ratio, floored/capped against sudden spikes)
- A dedicated `alertcondition` for every signal type
- Pine v4 → v6 port and general code cleanup
These additions go beyond a minor style or naming change to the HARSI base —
they add an independent layer that extends the indicator's function and
purpose.
## Open-Source Note
This script is **open-source**; because it builds on JayRogers' original
open-source HARSI logic, it is published as open-source rather than
protected/invite-only.
## How to Use
Settings are organized into four groups: HARSI candle settings, Fisher
Transform settings, divergence settings, and display settings. Defaults are
suitable for general use; the pivot left/right bar counts and maximum pivot
distance can be adjusted to tune signal frequency and lag.
*This indicator is for educational and analytical purposes only and does
not constitute investment advice.*
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.