RicardoSantos

Function Fisher Transform V1

added ability for selecting src to the fisher() function. now can be used with rsi/stoch/macd/etc...
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
study(title="Function Fisher Transform V1", shorttitle="F")
window01 = input(12)
window02 = input(48)
window03 = input(144)

f_fisher(_src, _window)=>
    _h = highest(_src, _window)
    _l = lowest(_src, _window)
    _value0 = .66 * ((_src - _l) / max(_h - _l, .001) - .5) + .67 * nz(_value0[1])
    _value1 = _value0 > .99 ? .999 : _value0 < -.99 ? -.999 : _value0
    _fisher = .5 * log((1 + _value1) / max(1 - _value1, .001)) + .5 * nz(_fisher[1])

r = rsi(close, 5)
fish1 = f_fisher(r, window01)
fish2 = f_fisher(r, window02)
fish3 = f_fisher(r, window03)

hline(1.5, color=black)
hline(0, color=black)
hline(-1.5, color=black)
plot(fish1, color=blue, title="Fast")
plot(fish2, color=black, title="Normal")
plot(fish3, color=red, title="Slow")