OPEN-SOURCE SCRIPT
Fisher

//version=5
indicator("Fisher + EMA + Histogram (Working)", overlay=false)
// Inputs
fLen = input.int(125, "Fisher Length")
emaLen = input.int(21, "EMA Length")
src = input.source(close, "Source")
// Fisher Transform
var float x = na
minL = ta.lowest(src, fLen)
maxH = ta.highest(src, fLen)
rng = maxH - minL
val = rng != 0 ? (src - minL) / rng : 0.5
x := 0.33 * 2 * (val - 0.5) + 0.67 * nz(x[1])
x := math.max(math.min(x, 0.999), -0.999)
fish = 0.5 * math.log((1 + x) / (1 - x))
// EMA of Fisher
fishEma = ta.ema(fish, emaLen)
// Histogram
hist = fish - fishEma
histColor = hist >= 0 ? color.new(color.lime, 50) : color.new(color.red, 50)
plot(hist, style=plot.style_histogram, color=histColor, title="Histogram")
// Fisher Plot
fishColor = fish > 2 ? color.red : fish < -2 ? color.lime : color.teal
plot(fish, "Fisher", color=fishColor, linewidth=2)
plot(fishEma, "Fisher EMA", color=color.orange, linewidth=2)
// Horizontal Lines
hline(2, "Upper Extreme", color=color.new(color.red, 70))
hline(-2, "Lower Extreme", color=color.new(color.green, 70))
hline(0, "Zero", color=color.gray)
// Cross Signals
bull = ta.crossover(fish, fishEma)
bear = ta.crossunder(fish, fishEma)
plotshape(bull, style=shape.triangleup, location=location.bottom, color=color.lime, size=size.tiny)
plotshape(bear, style=shape.triangledown, location=location.top, color=color.red, size=size.tiny)
// Background for extremes
bgcolor(fish > 2 ? color.new(color.red, 80) : fish < -2 ? color.new(color.green, 80) : na)
indicator("Fisher + EMA + Histogram (Working)", overlay=false)
// Inputs
fLen = input.int(125, "Fisher Length")
emaLen = input.int(21, "EMA Length")
src = input.source(close, "Source")
// Fisher Transform
var float x = na
minL = ta.lowest(src, fLen)
maxH = ta.highest(src, fLen)
rng = maxH - minL
val = rng != 0 ? (src - minL) / rng : 0.5
x := 0.33 * 2 * (val - 0.5) + 0.67 * nz(x[1])
x := math.max(math.min(x, 0.999), -0.999)
fish = 0.5 * math.log((1 + x) / (1 - x))
// EMA of Fisher
fishEma = ta.ema(fish, emaLen)
// Histogram
hist = fish - fishEma
histColor = hist >= 0 ? color.new(color.lime, 50) : color.new(color.red, 50)
plot(hist, style=plot.style_histogram, color=histColor, title="Histogram")
// Fisher Plot
fishColor = fish > 2 ? color.red : fish < -2 ? color.lime : color.teal
plot(fish, "Fisher", color=fishColor, linewidth=2)
plot(fishEma, "Fisher EMA", color=color.orange, linewidth=2)
// Horizontal Lines
hline(2, "Upper Extreme", color=color.new(color.red, 70))
hline(-2, "Lower Extreme", color=color.new(color.green, 70))
hline(0, "Zero", color=color.gray)
// Cross Signals
bull = ta.crossover(fish, fishEma)
bear = ta.crossunder(fish, fishEma)
plotshape(bull, style=shape.triangleup, location=location.bottom, color=color.lime, size=size.tiny)
plotshape(bear, style=shape.triangledown, location=location.top, color=color.red, size=size.tiny)
// Background for extremes
bgcolor(fish > 2 ? color.new(color.red, 80) : fish < -2 ? color.new(color.green, 80) : na)
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.