Message
Message
//Kullanici bilgileri
Anafib = input(true, "Günlük fib, Aç / Kapa")
dashOn = input(false, "Panel Açık / Kapalı")
srLines = input(false, "Destek & Direnç Açık / Kapalı")
dashDist = input(8, "Panel uzaklığı")
dashColor = input(color.new(#696969, 80), "Panel rengi", inline="Dash Line")
dashTextColor = input(color.new(#ffffff, 0), "Yazı rengi", inline="Dash Line")
afibOn = input(false, "Fibonacci Geri Çekilmesi Açık / Kapalı")
Fib=input(365)
maxr = highest(high, Fib)
minr = lowest(low, Fib)
ranr = maxr - minr
ON=plot( maxr , title="100%", color=#888787, linewidth=3, transp=15)
SS=plot( maxr - 0.236 * ranr, title="23,6%", color=#00bcd4, linewidth=3, transp=15)
SO=plot( maxr - 0.382 * ranr, title="38.2%", color=#ffa726, linewidth=2, transp=15)
FI=plot( maxr - 0.50 * ranr, title="50%", color=#888787, linewidth=3, transp=15)
TE=plot( minr + 0.382 * ranr, title="61.8%", color=#4caf50, linewidth=2, transp=15)
TT=plot( minr + 0.214 * ranr, title="78.6%", color=#1976d2, linewidth=3, transp=15)
ZZ=plot( minr , title="0%", color=#888787, linewidth=3, transp=15)
fill(ON,SS, color=#f91111, transp=87)
fill(SS,SO, color=#f91111, transp=87)
fill(TE,TT, color=#4CAF50, transp=87)
fill(TT,ZZ, color=#4CAF50, transp=87)
atr = atr(14)
stdAtr = 2 * stdev(atr, 20)
smaAtr = sma(atr, 20)
topAtrDev = smaAtr + stdAtr
bottomAtrDev = smaAtr - stdAtr
calcDev = (atr - bottomAtrDev) / (topAtrDev - bottomAtrDev)
percentVol = (40 * calcDev + 30)
if not na(iH)
dev = calc_dev(pLast, pH)
[id, isHigh] = pivotFound(dev, true, iH, pH)
if not na(id)
if id != lineLast
line.delete(lineLast)
lineLast := id
isHighLast := isHigh
iPrev := iLast
iLast := iH
pLast := pH
else
if not na(iL)
dev = calc_dev(pLast, pL)
[id, isHigh] = pivotFound(dev, false, iL, pL)
if not na(id)
if id != lineLast
line.delete(lineLast)
lineLast := id
isHighLast := isHigh
iPrev := iLast
iLast := iL
pLast := pL
_wrap(txt) =>
"(" + tostring(txt, "#.##") + ")"
_crossing_level(sr, r) =>
(r > sr and r < sr[1]) or (r < sr and r > sr[1])
show_0 = true
value_0 = 0
color_0 = #787b86
if afibOn
processLevel(show_0, value_0, color_0)
show_0_236 = true
value_0_236 = 0.236
color_0_236 = #f44336
if afibOn
processLevel(show_0_236, value_0_236, color_0_236)
show_0_382 = true
value_0_382 = 0.382
color_0_382 = #81c784
if afibOn
processLevel(show_0_382, value_0_382, color_0_382)
show_0_5 = true
value_0_5 = 0.5
color_0_5 = #4caf50
if afibOn
processLevel(show_0_5, value_0_5, color_0_5)
show_0_618 = true
value_0_618 = 0.618
color_0_618 = #009688
if afibOn
processLevel(show_0_618, value_0_618, color_0_618)
show_0_786 = true
value_0_786 = 0.786
color_0_786 = #64b5f6
if afibOn
processLevel(show_0_786, value_0_786, color_0_786)
show_1 = true
value_1 = 1
color_1 = #787b86
if afibOn
processLevel(show_1, value_1, color_1)
volumeDash = volume
rsiDash = rsi(close, 14)
ema9 = ema(close, 9)
totalSentTxt = ema9 > ema9[2] ? "Boğa" : ema9 < ema9[2] ? "Ayı" : "Flat"
sma = sma(close, 50)
if dashOn
label lemonLabel = label.new(time, close,
text="\n━━━━━━━━━━━━━━━━━"
+ "\n Volatilite | " + "%" + tostring(percentVol, "##.##")
+ "\n Hacim | " + tostring(volumeDash,"##.##" )
+ "\n RSI | " + tostring(rsiDash, "##.##")
+ "\n Boğa/Ayı | " + totalSentTxt,