Tradingview
PİNE EDİTÖR YÜKLEMELERİ ÖĞRENMEK İÇİN İLETİŞİME GEÇİNİZ.
ÖZEL İNDİKATÖR
EFSANE İNDİKATÖRÜ
study(" E F S A N E", overlay=true)
sae = input(true, title="A")
sce = input(true, title="B")
st = input(true, title="C")
def = input(false, title="D")
pa = input(true, title="E")
sl = input(false, title="F")
//EMA Definitions
emaSlow = ema(close, 62)
emaFast = ema(close, 38)
//Aggressive Entry or Alert To Potential Trade
pullbackUpT() => emaFast > emaSlow and close < emaFast
pullbackDnT() => emaFast < emaSlow and close > emaFast
//Conservative Entry Code For Highlight Bars
entryUpT() => emaFast > emaSlow and close[1] < emaFast and close > emaFast
entryDnT() => emaFast < emaSlow and close[1] > emaFast and close < emaFast
//Conservative Entry True/False Condition
entryUpTrend = emaFast > emaSlow and close[1] < emaFast and close > emaFast ? 1 : 0
entryDnTrend = emaFast < emaSlow and close[1] > emaFast and close < emaFast ? 1 : 0
//Define Up and Down Trend for Trend Arrows at Top and Bottom of Screen
upTrend = emaFast >= emaSlow
downTrend = emaFast < emaSlow
//Definition for Conseervative Entry Up and Down PlotArrows
codiff = entryUpTrend == 1 ? entryUpTrend : 0
codiff2 = entryDnTrend == 1 ? entryDnTrend : 0
//Color definition for Moving Averages
col = emaFast > emaSlow ? lime : emaFast < emaSlow ? red : yellow
//Moving Average Plots and Fill
p1 = plot(emaSlow, title="Slow MA", style=linebr, linewidth=4, color=col)
p2 = plot(emaFast, title="Slow MA", style=linebr, linewidth=2, color=col)
fill(p1, p2, color=silver, transp=50)
//Aggressive Entry, Conservative Entry Highlight Bars
barcolor(sae and pullbackUpT() ? yellow : sae and pullbackDnT() ? yellow : na)
barcolor(sce and entryUpT() ? aqua : sce and entryDnT() ? aqua : na)
//Trend Triangles at Top and Bottom of Screen
plotshape(st and upTrend ? upTrend : na, title="Conservative Buy Entry Triangle",style=shape.triangleup, location=location.bottom, color=lime, transp=0, offset=0)
plotshape(st and downTrend ? downTrend : na, title="Conservative Short Entry Triangle",style=shape.triangledown, location=location.top, color=red, transp=0, offset=0)
//Plot Arrows OR Letters B and S for Buy Sell Signals
plotarrow(pa and codiff ? codiff : na, title="Up Entry Arrow", colorup=lime, maxheight=30, minheight=30, transp=0)
plotarrow(pa and codiff2*-1 ? codiff2*-1 : na, title="Down Entry Arrow", colordown=red, maxheight=30, minheight=30, transp=0)
plotchar(sl and codiff ? low - tr : na, title="Buy Entry", offset=0, char='A', location=location.absolute, color=black, transp=0)
plotchar(sl and codiff2 ? high + tr : na, title="Short Entry", offset=0, char='S', location=location.absolute, color=black, transp=0)
ÖZEL İNDİKATÖR
ÖNCÜ İNDİKATÖRÜ
//@version=3
study(title="Ö N C Ü", shorttitle="Ö N C Ü")
len = input(9, minval=1, title="Length")
high_ = highest(hl2, len)
low_ = lowest(hl2, len)
round_(val) => val > .99 ? .999 : val < -.99 ? -.999 : val
value = 0.0
value := round_(.66 * ((hl2 - low_) / max(high_ - low_, .001) - .5) + .67 * nz(value[1]))
fish1 = 0.0
fish1 := .5 * log((1 + value) / max(1 - value, .001)) + .5 * nz(fish1[1])
fish2 = fish1[1]
hline(1.5, color=orange)
hline(0.75)
hline(0, color=orange)
hline(-0.75)
hline(-1.5, color=orange)
plot(fish1, color=blue, title="Fisher")
plot(fish2, color=green, title="Trigger")
up5 =crossover(fish1,fish2) and fish1<-1.5
down5 = crossunder(fish1,fish2) and fish1>0
plotchar(up5, title="buy", char='A ', location=location.bottom, color=black, transp=0, offset=0,size=size.tiny)
plotchar(down5, title="sell",char='S', offset=0, location=location.top, color=black, transp=0,size=size.tiny)
alertcondition(up5, title='buy', message='go long')
alertcondition(down5, title='sell', message='go short')
ÖZEL İNDİKATÖR
ÖNCÜ RENKLİ İNDİKATÖRÜ
//@version=3
//Fisher
study(title="öncü", shorttitle="Ö N C Ü", overlay=false)
lngth = input(09, minval=1, title="Length")
enyuk = highest(hl2, lngth)
endus = lowest(hl2, lngth)
round_(val) => val > .99 ? .999 : val < -.99 ? -.999 : val
value = 0.0
value := round_(.66 * ((hl2 - endus) / max(enyuk - endus, .001) - .5) + .67 * nz(value[1]))
fish1 = 0.0
fish1 := .5 * log((1 + value) / max(1 - value, .001)) + .5 * nz(fish1[1])
fish2 = fish1[1]
hline(1.50, title="+2.00 Line", linewidth=1, color=orange)
hline(0.75, title="+1.00 Line", linewidth=1, color=orange)
hline(00.00, title="00.00 Line", linewidth=1, color=black)
hline(-0.75, title="-1.00 Line", linewidth=1, color=orange)
hline(-1.50, title="-2.00 Line", linewidth=1, color=orange)
plot(fish1, title="Fisher", style=line, linewidth=1, color=blue, transp=0)
plot(fish2, title="Trigger", style=line, linewidth=1, color=green, transp=0)
upcutoff = input(0, title="Up Limit")
dncutoff = input(-1.0, title="Dn Limit")
upmove = crossover(fish1, fish2) and fish1 < dncutoff
dnmove = crossunder(fish1, fish2) and fish1 > upcutoff
plotshape(upmove, title="Buy", style=shape.labelup, location=location.bottom, color=blue, transp=0, size=size.auto, text="AL", textcolor=white)
plotshape(dnmove, title="Sell", style=shape.labeldown, location=location.top, color=black, transp=0, size=size.auto, text="SAT", textcolor=white)
ÖZEL İNDİKATÖR
COMBO + ÜSTSEL HAREKETLİ ORTALAMA
study("Hareketli Ortalama COMBO", overlay=true, shorttitle="üssel ortalamalar")
src = input(title="Source", type=source, defval=close)
length1 = input(5, "EMA")
plot(ema(src, length1), color=black, linewidth=2, title="MOV1")
length2 = input(9, "EMA")
plot(ema(src, length2), color=purple, linewidth=2, title="MOV2")
length3 = input(21, "EMA")
plot(ema(src, length3), color=red, linewidth=2, title="MOV3")
length4 = input(50, "EMA")
plot(ema(src, length4), color=green, linewidth=2, title="MOV4")
length5 = input(100, "EMA")
plot(ema(src, length5), color=orange, linewidth=2, title="MOV5")
length6 = input(200, "EMA")
plot(ema(src, length6), color=blue, linewidth=2, title="MOV6")
length7 = input(377, "EMA")
plot(ema(src, length7), color=purple, linewidth=2, title="MOV7")
length8 = input(610, "EMA")
plot(ema(src, length8), color=green, linewidth=2, title="MOV8")
ÖZEL İNDİKATÖR
STR İNDİKATÖRÜ
study(title="S T R", overlay=true)
ema5 = ema(close,5)
ema21 = ema(close, 21)
ema200 = ema(close,200)
plot(ema5, title = "ema5", color = lime, linewidth = 3)
plot(ema21, title = "ema21", color = blue, linewidth = 3)
plot(ema200, title = "ema200", color = red, linewidth = 3)
plot(cross(ema5, ema21) and ema5[1] < ema21[1] ? ema5: na, title="al", style=cross, linewidth=4, color=blue)
plot(cross(ema5, ema21) and ema5[1] > ema21[1] ? ema5 : na, title="sat", style=cross, linewidth=4, color=black)
plotshape(cross(ema5, ema21) and ema5[1] < ema21[1] ? true : na, style=shape.triangleup, text="AL",color=green,size=size.small, location=location.belowbar,transp=0)
plotshape(cross(ema5, ema21) and ema5[1] > ema21[1] ? true : na, style=shape.triangledown, text="SAT",color=black,size=size.small, location=location.abovebar,transp=0)
barcolor(cross(ema5, ema21) and ema5[1] < ema21[1] ? blue: cross(ema5, ema21) and ema5[1] > ema21[1] ? black: close < open ? red: green)
ÖZEL İNDİKATÖR
MPT55 İNDİKATÖRÜ
strategy("mpt55", overlay=true, default_qty_value=100)
res = input(title="Main SuperTrend Time Frame", type=resolution, defval="120")
Factor=input(1, minval=1,maxval = 100)
Pd=input(1, minval=1,maxval = 100)
tp = input(500,title="Take Profit")
sl = input(400,title="Stop Loss")
Up=hl2-(Factor*atr(Pd))
Dn=hl2+(Factor*atr(Pd))
MUp=security(tickerid,res,hl2-(Factor*atr(Pd)))
MDn=security(tickerid,res,hl2+(Factor*atr(Pd)))
Mclose=security(tickerid,res,close)
TrendUp=close[1]>TrendUp[1]? max(Up,TrendUp[1]) : Up
TrendDown=close[1]<TrendDown[1]? min(Dn,TrendDown[1]) : Dn
MTrendUp=Mclose[1]>MTrendUp[1]? max(MUp,MTrendUp[1]) : MUp
MTrendDown=Mclose[1]<MTrendDown[1]? min(MDn,MTrendDown[1]) : MDn
Trend = close > TrendDown[1] ? 1: close< TrendUp[1]? -1: nz(Trend[1],1)
Tsl = Trend==1? TrendUp: TrendDown
MTrend = Mclose > MTrendDown[1] ? 1: Mclose< MTrendUp[1]? -1: nz(MTrend[1],1)
MTsl = MTrend==1? MTrendUp: MTrendDown
linecolor = Trend == 1 ? green : red
plot(Tsl, color = linecolor , style = line , linewidth = 2,title = "SuperTrend")
Mlinecolor = MTrend == 1 ? blue : orange
plot(MTsl, color = Mlinecolor , style = line , linewidth = 2,title = "Main SuperTrend")
plotshape(cross(close,Tsl) and close>Tsl , "Up Arrow", shape.triangleup,location.belowbar,green,0,0)
plotshape(cross(Tsl,close) and close<Tsl , "Down Arrow", shape.triangledown , location.abovebar, red,0,0)
up = Trend == 1 and Trend[1] == -1 and MTrend == 1
down = Trend == -1 and Trend[1] == 1 and MTrend == -1
plotarrow(up ? Trend : na, title="Up Entry Arrow", colorup=lime, maxheight=60, minheight=50, transp=0)
plotarrow(down ? Trend : na, title="Down Entry Arrow", colordown=red, maxheight=60, minheight=50, transp=0)
golong = Trend == 1 and Trend[1] == -1 and MTrend == 1
goshort = Trend == -1 and Trend[1] == 1 and MTrend == -1
strategy.entry("A L", strategy.long,when=golong)
strategy.exit("Close Buy","A L",profit=tp,loss=sl)
strategy.entry("S A T", strategy.short,when=goshort)
strategy.exit("Close Sell","S A T",profit=tp,loss=sl)
ÖZEL İNDİKATÖR
RALLİ HABERCİSİ İNDİKATÖRÜ
study(title="RALLİ HABERCİSİ ", overlay=true)
ema5 = ema(close, 5)
ema9 = ema(close, 9)
ema21 = ema(close, 21)
ema50 = ema(close, 50)
ema100 = ema(close, 100)
ema200 = ema(close, 200)
plot(ema5, title="ema5", color = black,linewidth =2)
plot(ema9, title="ema9", color = purple,linewidth =2)
plot(ema21, title = "ema21", color = red, linewidth = 2)
plot(ema50, title = "ema50", color = green, linewidth = 2)
plot(ema100, title = "ema100", color = orange, linewidth = 2)
plot(ema200, title = "ema200", color = blue, linewidth = 2)
plot(cross(ema5, ema9) and ema5[1] < ema9[1] ? ema5 : na, title=" AL 1", style=cross, linewidth=4, color=blue) // AL SİNYALİ
plot(cross(ema9, ema21) and ema9[1] < ema21[1] ? ema9 : na, title=" AL 2", style=cross, linewidth=4, color=blue) // AL SİNYALİ
plot(cross(ema50, ema200) and ema50[1] < ema200[1] ? ema50 : na, title="ALTIN RALLİ", style=cross, linewidth=4, color=blue) // golden cross
plot(cross(ema21, ema50) and ema21[1] < ema50[1] ? ema21 : na, title="GÜMÜŞ RALLİ", style=cross, linewidth=4, color=blue) // silver cross
plot(cross(ema21, ema50) and ema21[1] > ema50[1] ? ema50 : na, title="SAT 3", style=cross, linewidth=4, color=black)//DEATH CROSS
plot(cross(ema9, ema21) and ema9[1] > ema21[1] ? ema9 : na, title="SAT 2", style=cross, linewidth=4, color=black) //DEATH CROSS
plot(cross(ema100, ema200) and ema100[1] > ema200[1] ? ema100 : na, title="SON ŞANSIN SAT ", style=cross, linewidth=4, color=black) //DEATH CROSS
plot(cross(ema50, ema200) and ema50[1] > ema200[1] ? ema50 : na, title="SATMAZSAN BATARSIN", style=cross, linewidth=4, color=black) //DEATH CROSS
plot(cross(ema50, ema100) and ema50[1] > ema100[1] ? ema50 : na, title="SAT 4", style=cross, linewidth=4, color=black) //DEATH CROSS
plot(cross(ema5, ema9) and ema5[1] > ema9[1] ? ema5 : na, title="SAT 1", style=cross, linewidth=4, color=black) //DEATH CROSS
plot(cross(ema50, ema200) and ema50[1] < ema200[1] ? ema50 : na, title="RALLİ", style=cross, linewidth=4, color=blue) // golden cross
plot(cross(ema100, ema200) and ema100[1] < ema200[1] ? ema100 : na, title="RALLİ", style=cross, linewidth=4, color=blue) // golden cross
plot(cross(ema21, ema200) and ema21[1] < ema200[1] ? ema21 : na, title=" RALLİ", style=cross, linewidth=4, color=blue) // golden cross
plotshape(cross(ema5, ema21) and ema5[1] < ema21[1] ? true : na, style=shape.triangleup, text="AL ",color=blue,size=size.small, location=location.belowbar,transp=0)
plotshape(cross(ema50, ema200) and ema50[1] < ema200[1] ? true : na, style=shape.diamond, text="ALTIN RALLİ\nGOLDEN CROSS",color=orange,size=size.small, location=location.abovebar,transp=0)
plotshape(cross(ema21, ema50) and ema21[1] < ema50[1] ? true : na, style=shape.diamond, text="GÜMÜŞ RALLİ\nSİLVER CROSS",color=blue,size=size.small, location=location.abovebar,transp=0)
plotshape(cross(ema5, ema21) and ema5[1] > ema21[1] ? true : na, style=shape.triangledown, text="SAT ",color=black,size=size.small, location=location.abovebar,transp=0)
plotshape(cross(ema50, ema200) and ema50[1] > ema200[1] ? true : na, style=shape.triangleup, text="SATMAZSAN BATARSIN\nDEATH CROSS",color=black,size=size.small, location=location.belowbar,transp=0)
barcolor(cross(ema50, ema200) and ema50[1] < ema200[1] ? blue: cross(ema21, ema50) and ema21[1] < ema50[1] ? blue: close < open ? red: green)
ÖZEL İNDİKATÖR
TRB HABERCİSİ İNDİKATÖRÜ
study(title="PM", shorttitle="TRB")
length1 = input(14, minval=1, title="TTI")
ma_length = input(13, minval=1, title="PMI")
src = input(close, title="Source")
ma1 = sma(src, length1)
cci1 = (src - ma1) / (0.040 * dev(src, length1))
//plot(cci1, color=black, linewidth=2)
plot(cci1, linewidth=2)
//plot(ema(cci1, ma_length), color=green, linewidth=2)
plot(ema(cci1, ma_length), linewidth=2)
plotColour = (cci1 > ema(cci1, ma_length)) ? blue : red
plotCCIEMA = plot(series=cci1, color=plotColour, linewidth=3)
//plotHoriz = plot(series=0, color=black, style=circles)
//fill(plot1=plotCCIEMA, plot2=plotHoriz, color=black, transp=90)
band0 = hline(73, color=blue)
band1 = hline(-73, color=blue)
band2 = hline(0,title="zero")
ÖZEL İNDİKATÖR
STR 2 İNDİKATÖRÜ
//@version=4
strategy(" S T R 2", overlay=true)
start = input(0.02)
increment = input(0.20)
maximum = input(0.2)
psar = sar(start, increment, maximum)
if (psar >= high)
strategy.entry("AL", strategy.long, stop=psar, comment="AL")
else
strategy.cancel("AL")
if (psar <= low)
strategy.entry("SAT", strategy.short, stop=psar, comment="SAT")
else
strategy.cancel("SAT")
//plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr)
ÖZEL İNDİKATÖR
STRB İNDİKATÖRÜ
study(title="S T R B", overlay=true)
ema5 = ema(close,5)
ema13 = ema(close,13)
ema200 = ema(close,200)
plot(ema5, title = "ema5", color = lime, linewidth = 3)
plot(ema13, title = "ema13", color = blue, linewidth = 3)
plot(ema200, title = "ema200", color = red, linewidth = 3)
plot(cross(ema5, ema13) and ema5[1] < ema13[1] ? ema5: na, title="al", style=cross, linewidth=4, color=blue)
plot(cross(ema5, ema13) and ema5[1] > ema13[1] ? ema5 : na, title="sat", style=cross, linewidth=4, color=black)
plotshape(cross(ema5, ema13) and ema5[1] < ema13[1] ? true : na, style=shape.triangleup, text="AL",color=green,size=size.small, location=location.belowbar,transp=0)
plotshape(cross(ema5, ema13) and ema5[1] > ema13[1] ? true : na, style=shape.triangledown, text="SAT",color=black,size=size.small, location=location.abovebar,transp=0)
barcolor(cross(ema5, ema13) and ema5[1] < ema13[1] ? blue: cross(ema5, ema13) and ema5[1] > ema13[1] ? black: close < open ? red: green)
ÖZEL İNDİKATÖR
İZCİ İNDİKATÖRÜ
//@version=4
study(shorttitle=" İ Z C İ", title=" İ Z C İ", overlay=true, resolution="")
length = input(20, minval=1)
src = input(close, title="Source")
mult = input(2.0, minval=0.001, maxval=50, title="StdDev")
basis = sma(src, length)
dev = mult * stdev(src, length)
upper = basis + dev
lower = basis - dev
offset = input(0, "Offset", type = input.integer, minval = -500, maxval = 500)
plot(basis, "Basis", color=color.black, offset = offset)
p1 = plot(upper, "Upper", color=color.red, offset = offset)
p2 = plot(lower, "Lower", color=color.red, offset = offset)
fill(p1, p2, title = "Background", color=#198787, transp=95)
ema5 = ema(close,5)
ema13 = ema(close,13)
plot(cross(ema5, ema13) and ema5[1] < ema13[1] ? ema5: na, title="BUY", linewidth=4, color=color.blue)
plot(cross(ema5, ema13) and ema5[1] > ema13[1] ? ema5 : na, title="SELL", linewidth=4, color=color.red)
plotshape(cross(ema5, ema13) and ema5[1] < ema13[1] ? true : na, style=shape.triangleup, text="AL ",color=color.blue,size=size.small, location=location.belowbar,transp=0)
plotshape(cross(ema5, ema13) and ema5[1] > ema13[1] ? true : na, style=shape.triangledown, text="SAT",color=color.red,size=size.small, location=location.abovebar,transp=0)
barcolor(cross(ema5, ema13) and ema5[1] < ema13[1] ? color.blue: cross(ema5, ema13) and ema5[1] > ema13[1] ? color.purple: close < open ? color.yellow: color.aqua)
ÖZEL İNDİKATÖR
STR TREND İNDİKATÖRÜ
study(title="S T R ", overlay=true)
ema5 = ema(close,5)
ema21 = ema(close,21)
ema200 = ema(close,200)
plot(ema5, title = "ema5", color = lime, linewidth = 3)
plot(ema21, title = "ema21", color = blue, linewidth = 3)
plot(ema200, title = "ema200", color = red, linewidth = 3)
plot(cross(ema5, ema21) and ema5[1] < ema21[1] ? ema5: na, title="al", style=cross, linewidth=4, color=blue)
plot(cross(ema5, ema21) and ema5[1] > ema21[1] ? ema5 : na, title="sat", style=cross, linewidth=4, color=black)
plotshape(cross(ema5, ema21) and ema5[1] < ema21[1] ? true : na, style=shape.triangleup, text="AL",color=green,size=size.small, location=location.belowbar,transp=0)
plotshape(cross(ema5, ema21) and ema5[1] > ema21[1] ? true : na, style=shape.triangledown, text="SAT",color=black,size=size.small, location=location.abovebar,transp=0)
plotshape(cross(ema21, ema200) and ema21[1] < ema200[1] ? true : na, style=shape.triangleup, text="trend pozitif",color=blue,size=size.small, location=location.belowbar,transp=0)
plotshape(cross(ema21, ema200) and ema21[1] > ema200[1] ? true : na, style=shape.triangledown, text="trend negatif",color=red,size=size.small, location=location.abovebar,transp=0)
barcolor(cross(ema5, ema21) and ema5[1] < ema21[1] ? blue: cross(ema5, ema21) and ema5[1] > ema21[1] ? black: close < open ? red: green)
length = input(20, minval=1)
src = input(close, title="Source")
mult = input(2.0, minval=0.001, maxval=50, title="StdDev")
basis = sma(src, length)
dev = mult * stdev(src, length)
upper = basis + dev
lower = basis - dev
offset = input(0, "Offset", type = integer, minval = -500, maxval = 500)
plot(basis, "Basis", color=#872323, offset = offset)
p1 = plot(upper, "Upper", color=purple, offset = offset)
p2 = plot(lower, "Lower", color=purple, offset = offset)
fill(p1, p2, title = "Background", color=aqua, transp=95)
ÖZEL İNDİKATÖR
ÖNCÜ 2 İNDİKATÖRÜ
study(title="Ö N C Ü 2", shorttitle="Ö N C Ü 2")
length = input(5, minval=1), smoothK = input(3, minval=1), smoothD = input(3, minval=1)
k = ema(stoch(close, high, low, length), smoothK)
d = ema(k, smoothD)
plot(k, color=blue, linewidth=2)
plot(d, color=green, linewidth=1)
h0 = hline(80, color=black, linewidth=1)
h1 = hline(20, color=black, linewidth=1)
fill(h0, h1, color=lime, transp=90)
plot(cross(d, k) ? d : na,color=black, style = circles, linewidth = 4)
OutputSignal = k >= d ? 0 : 1
ÖZEL İNDİKATÖR
KIZILDERELİ İNDİKATÖRÜ
study(title="JAPON İCADI", shorttitle="KIZILDERİLİ BULUTU", overlay=true)
conversionPeriods = input(9, minval=1, title="Conversion Line Periods"),
basePeriods = input(26, minval=1, title="Base Line Periods")
laggingSpan2Periods = input(52, minval=1, title="Lagging Span 2 Periods"),
displacement = input(26, minval=1, title="Displacement")
donchian(len) => avg(lowest(len), highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
plot(conversionLine, color=#0496ff, title="Conversion Line")
plot(baseLine, color=#991515, title="Base Line")
plot(close, offset = -displacement, color=#459915, title="Lagging Span")
p1 = plot(leadLine1, offset = displacement, color=green,
title="Lead 1")
p2 = plot(leadLine2, offset = displacement, color=red,
title="Lead 2")
fill(p1, p2, color = leadLine1 > leadLine2 ? green : red)
M1= wma(close, 3)
M2= wma(M1, 5)
M3= wma(M2, 8)
M4= wma(M3, 13)
M5= wma(M4, 21)
MAVW= wma(M5, 34)
plot(MAVW, color=blue, linewidth=2, title="MAVW")
plot(valuewhen(low>low[1] , low[1] , 1), linewidth=2, color=purple, title="TSL")
ÖZEL İNDİKATÖR
PARABOLİK SAR RENKLİ İNDİKATÖRÜ
//@version=4
study("new", shorttitle="PSAR", overlay=true)
start = input(title="Start", type=input.float, step=0.001, defval=0.02)
increment = input(title="Increment", type=input.float, step=0.001, defval=0.02)
maximum = input(title="Maximum", type=input.float, step=0.01, defval=0.2)
width = input(title="Point Width", type=input.integer, minval=1, defval=2)
highlightStartPoints = input(title="Highlight Start Points ?", type=input.bool, defval=true)
showLabels = input(title="Show Buy/Sell Labels ?", type=input.bool, defval=true)
highlightState = input(title="Highlight State ?", type=input.bool, defval=true)
psar = sar(start, increment, maximum)
dir = psar < close ? 1 : -1
psarColor = dir == 1 ? #3388bb : #fdcc02
psarPlot = plot(psar, title="PSAR", style=plot.style_circles, linewidth=width, color=psarColor, transp=0)
longColor = color.blue
shortColor = color.red
noneColor = color.new(color.white, 100)
buySignal = dir == 1 and dir[1] == -1
plotshape(buySignal and highlightStartPoints ? psar : na, title="Long Start", location=location.absolute, style=shape.circle, size=size.tiny, color=longColor, transp=0)
plotshape(buySignal and showLabels ? psar : na, title="Buy Label", text="AL", location=location.absolute, style=shape.labelup, size=size.tiny, color=longColor, textcolor=color.white, transp=0)
sellSignal = dir == -1 and dir[1] == 1
plotshape(sellSignal and highlightStartPoints ? psar : na, title="Short Start", location=location.absolute, style=shape.circle, size=size.tiny, color=shortColor, transp=0)
plotshape(sellSignal and showLabels ? psar : na, title="Sell Label", text="SAT", location=location.absolute, style=shape.labeldown, size=size.tiny, color=shortColor, textcolor=color.white, transp=0)
midPricePlot = plot(ohlc4, title="", style=plot.style_circles, linewidth=0)
fillColor = highlightState ? (dir == 1 ? longColor : shortColor) : noneColor
fill(midPricePlot, psarPlot, title="Trade State Filling", color=fillColor)
changeCond = dir != dir[1]
alertcondition(changeCond, title="PSAR Direction Change", message="PSAR has changed direction!")
alertcondition(buySignal, title="PSAR Long", message="PSAR Long")
alertcondition(sellSignal, title="PSAR Short", message="PSAR Sell")
ÖZEL İNDİKATÖR
PAS İNDİKATÖRÜ
//@version=4
study("PAS ", overlay = false)
rsi_length = input(14, title = "A1", type = input.integer, minval = 1)
rsi_smooth_length = input(9, title = "A2", type = input.integer, minval = 1)
rsi_threshold_period = input(25, title = "A3", type = input.integer, minval = 1)
rsi_overbought = input(0.8, title = "A4", type = input.float, minval = 0, maxval = 1)
rsi_oversold = input(0.2, title = "A5", type = input.float, minval = 0, maxval = 1)
tma_enable = input(false, title = "A6")
tma_length = input(3, title = "A7", minval = 2)
tma_factor = input(1, title = "A8", step = 0.1, minval = 0.1)
get_ift(values, smooth_length) =>
smoothed = wma(0.1 * values, smooth_length)
(exp(2 * smoothed) - 1) / (exp(2 * smoothed) + 1)
get_gd(values, length, factor) =>
ema(values, length) * (1 + factor) - ema(ema(values, length), length) * factor
get_tma(values, length, factor) =>
get_gd(get_gd(get_gd(values, length, factor), length, factor), length, factor)
values = tma_enable ? get_tma(close, tma_length, tma_factor) : close
rsi = rsi(values, rsi_length)
ift = get_ift(rsi - 50, rsi_smooth_length)
min = lowest(ift, rsi_threshold_period)
max = highest(ift, rsi_threshold_period)
range = max - min
top = min + rsi_overbought * range
bot = min + rsi_oversold * range
mid = min + 0.5 * range
signal = plot(ift, color = ift > top ? color.green : ift < bot ? color.red : color.green, linewidth = 3)
upper = plot(top, color = color.blue, linewidth = 2)
lower = plot(bot, color = color.blue, linewidth = 2)
plot(mid, color = color.black, linewidth = 2)
fill(signal, upper, color = ift > top ? color.green : na, transp = 80)
fill(signal, lower, color = ift < bot ? color.red : na, transp = 80)
ÖZEL İNDİKATÖR
N KRAL 1 İNDİKATÖRÜ
//@version=4
study(title="NKRAL1", overlay = true)
// Inputs
a = input(1, title = "HASSASİYET")
c = input(10, title = "NKRAL AYARLARI")
h = input(false, title = "FARKLI BAKIŞ")
xATR = atr(c)
nLoss = a * xATR
src = h ? security(heikinashi(syminfo.tickerid), timeframe.period, close, lookahead = false) : close
xATRTrailingStop = 0.0
xATRTrailingStop := iff(src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), src - nLoss),
iff(src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), src + nLoss),
iff(src > nz(xATRTrailingStop[1], 0), src - nLoss, src + nLoss)))
pos = 0
pos := iff(src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0), 1,
iff(src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0)))
xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue
ema = ema(src,1)
above = crossover(ema, xATRTrailingStop)
below = crossover(xATRTrailingStop, ema)
buy = src > xATRTrailingStop and above
sell = src < xATRTrailingStop and below
barbuy = src > xATRTrailingStop
barsell = src < xATRTrailingStop
plotshape(buy, title = "Buy", text = 'AL', style = shape.labelup, location = location.belowbar, color= color.green, textcolor = color.white, transp = 0, size = size.small)
plotshape(sell, title = "Sell", text = 'SAT', style = shape.labeldown, location = location.abovebar, color= color.red, textcolor = color.white, transp = 0, size = size.small)
barcolor(barbuy ? color.aqua : na)
barcolor(barsell ? color.red : na)
alertcondition(buy, "UT Long", "UT Long")
alertcondition(sell, "UT Short", "UT Short")
length = input(20, minval=1)
arc = input(close, title="Source")
mult = input(2.0, minval=0.001, maxval=50)
basis = sma(arc, length)
dev = mult * stdev(arc, length)
upper = basis + dev
lower = basis - dev
plot(basis, color=color.black)
p1 = plot(upper, color=color.red)
p2 = plot(lower, color=color.red)
fill(p1, p2)
brc = input(close, title="Source")
length1 = input(5, "EMA")
plot(ema(brc, length1), color=color.black, linewidth=2, title="MOV1")
length2 = input(9, "EMA")
plot(ema(brc, length2), color=color.purple, linewidth=2, title="MOV2")
length3 = input(21, "EMA")
plot(ema(brc, length3), color=color.red, linewidth=2, title="MOV3")
length4 = input(50, "EMA")
plot(ema(brc, length4), color=color.green, linewidth=2, title="MOV4")
length5 = input(100, "EMA")
plot(ema(brc, length5), color=color.orange, linewidth=2, title="MOV5")
length6 = input(200, "EMA")
plot(ema(brc, length6), color=color.blue, linewidth=2, title="MOV6")
length7 = input(377, "EMA")
plot(ema(brc, length7), color=color.purple, linewidth=2, title="MOV7")
length8 = input(610, "EMA")
plot(ema(brc, length8), color=color.green, linewidth=2, title="MOV8")
ema12 = ema(close,12)
plot(ema12, title = "TRİGER", color = color.lime, linewidth = 3)
conversionPeriods = input(9, minval=1, title="Conversion Line Periods"),
basePeriods = input(26, minval=1, title="Base Line Periods")
laggingSpan2Periods = input(52, minval=1, title="Lagging Span 2 Periods"),
displacement = input(26, minval=1, title="Displacement")
donchian(len) => avg(lowest(len), highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
plot(conversionLine, color=#0496ff, title="Conversion Line")
plot(baseLine, color=#991515, title="Base Line")
plot(close, offset = -displacement, color=#459915, title="Lagging Span")
k1 = plot(leadLine1, offset = displacement, color=color.green,
title="Lead 1")
k2 = plot(leadLine2, offset = displacement, color=color.red,
title="Lead 2")
fill(k1, k2, color = leadLine1 > leadLine2 ? color.green :color.red)
start = input(0.02)
increment = input(0.02)
maximum = input(0.2)
out = sar(start, increment, maximum)
plot(out, style=plot.style_cross, color=color.blue)
ÖZEL İNDİKATÖR
BORSA İNDİKATÖRÜ
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © zyl42
//@version=4
study(title="nPadişah 27 Indicator", shorttitle="Borsa Hocam", overlay=true)
//----Ichimoku----
ichi_moku = input(title="Ichimoku Cloud Visible", type=input.bool, defval=true)
langingSpanVis = input(title="Lagging Span Visible", type=input.bool, defval=false)
conversionLineVis = input(title="Conversion Line Visible", type=input.bool, defval=false)
baseLineVis = input(title="Base Line Visible", type=input.bool, defval=false)
conversionPeriods = input(defval=9, minval=1, title="Conversion Line Periods")
basePeriods = input(defval=26, minval=1, title="Base Line Periods")
laggingSpan2Periods = input(defval=52, minval=1, title="Lagging Span 2 Periods")
displacement = input(defval=26, minval=1, title="Displacement")
donchian(len) => avg(lowest(len), highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
ichimokuFText=crossover(conversionLine, baseLine) or conversionLine > baseLine ? "AL":"SAT"
//ichimokuOText=crossover(offset(leadLine1, displacement-1), offset(leadLine2, displacement-1)) or offset(leadLine1, displacement-1) > offset(leadLine2, displacement-1) ? "AL":"SAT"
ichimokuAText=crossover(close, high[displacement-1]) or close > high[displacement-1] ? "AL":"SAT"
//ichimokuCText=((close[1]>leadLine1 and close>leadLine1) and (close[1]>leadLine2 and close>leadLine2))?"AL":"SAT"
plot(conversionLineVis ? conversionLine : na, color=#0496ff, title="Conversion Line")
plot(baseLineVis ? baseLine : na, color=#991515, title="Base Line")
plot(langingSpanVis ? close:na, offset = -displacement + 1, color=#459915, title="Lagging Span")
ip1 = plot(ichi_moku ? leadLine1 : na, offset=displacement-1, color=color.green, title="Lead 1", transp=80)
ip2 = plot(ichi_moku ? leadLine2 : na, offset=displacement-1, color=color.red, title="Lead 2", transp=80)
fill(ip1, ip2, color=leadLine1 > leadLine2 ? color.green : color.red, transp=80)
ichimokuText="ICHIMOKU\n"+ "Fiyat______: " + ichimokuFText + "\nArtçı______: " +ichimokuAText+ "\n"
//ichimokuText="ICHIMOKU\n"+ "Fiyat_____: " + ichimokuFText + "\nÖncü_____: " + ichimokuOText + "\nArtçı_____: " +ichimokuAText+ "\nFiyat > Bulut : " + ichimokuCText+"\n"
//----Ichimoku----
//----NKRAL----
nkral = input(title="nKRAL Visible", type=input.bool, defval=true)
nkrala = input(defval=1, title = "nKRAL HASSASİYET")
nkralc = input(defval=10, title = "nKRAL AYARLARI")
nkralh = input(defval=true, title = "nKRAL FARKLI BAKIŞ")
xATR = atr(nkralc)
nLoss = nkrala * xATR
nkralsrc = nkralh ? security(heikinashi(syminfo.tickerid), timeframe.period, close, lookahead = false) : close
xATRTrailingStop = 0.0
xATRTrailingStop := iff(nkralsrc > nz(xATRTrailingStop[1], 0) and nkralsrc[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), nkralsrc - nLoss),
iff(nkralsrc < nz(xATRTrailingStop[1], 0) and nkralsrc[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), nkralsrc + nLoss),
iff(nkralsrc > nz(xATRTrailingStop[1], 0), nkralsrc - nLoss, nkralsrc + nLoss)))
pos = 0
pos := iff(nkralsrc[1] < nz(xATRTrailingStop[1], 0) and nkralsrc > nz(xATRTrailingStop[1], 0), 1,
iff(nkralsrc[1] > nz(xATRTrailingStop[1], 0) and nkralsrc < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0)))
xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue
ema = ema(nkralsrc,1)
above = crossover(ema, xATRTrailingStop)
below = crossover(xATRTrailingStop, ema)
buy = nkralsrc > xATRTrailingStop and above
sell = nkralsrc < xATRTrailingStop and below
barbuy = nkralsrc > xATRTrailingStop
barsell = nkralsrc < xATRTrailingStop
plotshape(nkral ? buy : na, title = "Buy", text = 'AL', style = shape.labelup, location = location.belowbar, color= color.green, textcolor = color.white, transp = 0, size = size.small)
plotshape(nkral ? sell : na, title = "Sell", text = 'SAT', style = shape.labeldown, location = location.abovebar, color= color.red, textcolor = color.white, transp = 0, size = size.small)
barcolor(nkral and barbuy ? color.aqua : na)
barcolor(nkral and barsell ? color.red : na)
nkralText = barbuy ? "nKRAL_____: AL \n":"nKRAL_____: SAT\n"
//----NKRAL----
//----İZCİ LABEL----
ema5 = ema(close, 5)
ema13 = ema(close, 13)
izciText=crossover(ema5, ema13) or ema5 > ema13?"İZCİ_______: AL \n":"İZCİ_______: SAT\n"
//----İZCİ LABEL----
//----STR LABEL----
ema21 = ema(close, 21)
strText=crossover(ema5, ema21) or ema5 > ema21?"STR_______: AL \n":"STR_______: SAT\n"
//----STR LABEL----
//----Parabolic SAR----
psar = input(title="Parabolic Sar Visible", type=input.bool, defval=false)
start = input(0.02)
increment = input(0.02)
maximum = input(0.2, "Max Value")
sar_1 = sar(start, increment, maximum)
out = psar ? sar_1 : na
psarText = sar_1 < close?"PSAR______: AL \n":"PSAR______: SAT\n"
plot(out, "ParabolicSAR", color=#000000, linewidth=2, style=3)
//----Parabolic SAR----
//----Bollinger Bands----
b_b = input(title="Bollinger Bands Visible", type=input.bool, defval=true)
length = input(20, minval=1)
src = input(close, title="Source")
mult = input(2.0, minval=0.001, maxval=50)
sma_1 = sma(src, length)
basis = b_b ? sma_1 : na
stdev_1 = stdev(src, length)
dev = b_b ? mult * stdev_1 : na
upper = b_b ? basis + dev : na
lower = b_b ? basis - dev : na
midline=plot(basis, color=color.black, linewidth=2, transp=90)
bp1 = plot(upper, color=#801dad, linewidth=1)
bp2 = plot(lower, color=#801dad, linewidth=1)
fill(bp1, midline, color=#3388bb, transp=99)
fill(midline, bp2, color=#991515, transp=99)
//----Bollinger Bands----
//----MPT55----
mptVis = input(title="MPT55 Visible", type=input.bool, defval=false)
res = input(title="Main SuperTrend Time Frame ", type=input.resolution, defval="480")
Factor=input(1, minval=1,maxval = 100)
Pd=input(1, minval=1,maxval = 100)
default_qty_value=100
Up=hl2-(Factor*atr(Pd))
Dn=hl2+(Factor*atr(Pd))
MUp=security(syminfo.tickerid,res,hl2-(Factor*atr(Pd)))
MDn=security(syminfo.tickerid,res,hl2+(Factor*atr(Pd)))
Mclose=security(syminfo.tickerid,res,close)
var float TrendUp = na
var float TrendDown = na
var float MTrendUp = na
var float MTrendDown = na
var float Trend = na
var float Tsl = na
TrendUp:=close[1]>TrendUp[1]? max(Up,TrendUp[1]) : Up
TrendDown:=close[1]<TrendDown[1]? min(Dn,TrendDown[1]) : Dn
MTrendUp:=Mclose[1]>MTrendUp[1]? max(MUp,MTrendUp[1]) : MUp
MTrendDown:=Mclose[1]<MTrendDown[1]? min(MDn,MTrendDown[1]) : MDn
Trend := close > TrendDown[1] ? 1: close< TrendUp[1]? -1: nz(Trend[1],1)
Tsl := Trend==1? TrendUp: TrendDown
mptSat = mptVis?cross(Tsl,close) and close<Tsl : na
mptAl = mptVis?cross(close,Tsl) and close>Tsl : na
plotshape(mptSat , style=shape.triangledown, text="SAT",color=#991515,size=size.small, location=location.abovebar,transp=0)
plotshape(mptAl , style=shape.triangleup, text="AL",color=#3388bb,size=size.small, location=location.belowbar,transp=0)
mptText = cross(close,Tsl) or close>Tsl?"MPT55_____: AL \n":"MPT55_____: SAT\n"
//cross_1 = cross(Tsl,close)
//barcolor(cross(Tsl,close) and Tsl < close ? #3388bb : cross_1 and close > Tsl ? color.purple : close < open ? #991515 : #459915)
//----MPT55----
//----EFSANE1----
efsaneVis=input(defval=false, title="EFSANE1 Visible")
sae = input(defval=false, title="EFSANE1 Bar Color Sell")
sce = input(defval=false, title="EFSANE1 Bar Color Buy")
//st = input(defval=true, title="EFSANE1 Top/Bottom Trend")
pa = input(defval=false, title="EFSANE1 Buy/Sell Arrow")
//EMA Definitions
emaSlow = ema(close, 62)
emaFast = ema(close, 38)
//Aggressive Entry or Alert To Potential Trade
pullbackUpT() =>
emaFast > emaSlow and close < emaFast
pullbackDnT() =>
emaFast < emaSlow and close > emaFast
//Conservative Entry Code For Highlight Bars
entryUpT() =>
emaFast > emaSlow and close[1] < emaFast and close > emaFast
entryDnT() =>
emaFast < emaSlow and close[1] > emaFast and close < emaFast
//Conservative Entry True/False Condition
entryUpTrend = emaFast > emaSlow and close[1] < emaFast and close > emaFast ? 1 : 0
entryDnTrend = emaFast < emaSlow and close[1] > emaFast and close < emaFast ? 1 : 0
//Define Up and Down Trend for Trend Arrows at Top and Bottom of Screen
upTrend = emaFast >= emaSlow
downTrend = emaFast < emaSlow
//Definition for Conseervative Entry Up and Down PlotArrows
codiff = entryUpTrend == 1 ? entryUpTrend : 0
codiff2 = entryDnTrend == 1 ? entryDnTrend : 0
//Color definition for Moving Averages
col = emaFast > emaSlow ? color.lime : emaFast < emaSlow ? color.red : color.yellow
//Moving Average Plots and Fill
p1 = plot(efsaneVis ? emaSlow : na, title="Slow MA", style=plot.style_linebr, linewidth=4, color=col)
p2 = plot(efsaneVis ? emaFast : na, title="Slow MA", style=plot.style_linebr, linewidth=2, color=col)
fill(p1, p2, color=color.silver, transp=50)
//Aggressive Entry, Conservative Entry Highlight Bars
pullbackDnT_1 = pullbackDnT()
barcolor(sae and pullbackUpT() ? color.yellow : sae and pullbackDnT_1 ? color.yellow : na)
entryDnT_1 = entryDnT()
barcolor(sce and entryUpT() ? color.aqua : sce and entryDnT_1 ? color.aqua : na)
//Trend Triangles at Top and Bottom of Screen
//plotshape(st and upTrend ? upTrend : na, title="Conservative Buy Entry Triangle", style=shape.triangleup, location=location.bottom, color=color.green, transp=0, offset=0)
//plotshape(st and downTrend ? downTrend : na, title="Conservative Short Entry Triangle", style=shape.triangledown, location=location.top, color=color.red, transp=0, offset=0)
efsaneBirText = upTrend ? "EFSANE1___: AL \n" : "EFSANE1___: SAT\n"
//Plot Arrows OR Letters B and S for Buy Sell Signals
plotarrow(pa and codiff ? codiff : na, title="Up Entry Arrow", colorup=color.blue, maxheight=30, minheight=30, transp=0)
plotarrow(pa and codiff2 * -1 ? codiff2 * -1 : na, title="Down Entry Arrow", colordown=color.red, maxheight=30, minheight=30, transp=0)
//----EFSANE1----
//----EFSANE2----
efsaneIkiVis = input(title="EFSANE2 Visible", type=input.bool, defval=false)
barsBack = input(title="ATR Period", defval=1)
multplierFactor = input(title="ATR multplierFactoriplier", step=0.1, defval=3.0)
atr = multplierFactor * atr(barsBack)
longStop = hl2 - atr
longStopPrev = nz(longStop[1], longStop)
longStop := close[1] > longStopPrev ? max(longStop, longStopPrev) : longStop
shortStop = hl2 + atr
shortStopPrev = nz(shortStop[1], shortStop)
shortStop := close[1] < shortStopPrev ? min(shortStop, shortStopPrev) : shortStop
direction = 1
direction := nz(direction[1], direction)
direction := direction == -1 and close > shortStopPrev ? 1 : direction == 1 and close < longStopPrev ? -1 : direction
var valueToPlot = 0.0
if (direction == 1)
valueToPlot := longStop
else
valueToPlot := shortStop
plot(efsaneIkiVis ? (valueToPlot) : na, title="BuyLine", linewidth=2, color = (direction == 1 ? color.green : color.red))
plotshape(efsaneIkiVis ? (direction == 1 and direction[1] == -1 ? longStop : na) : na, title="A L ", style=shape.labelup, location=location.absolute, size=size.normal, text="AL", transp=0, textcolor = color.white, color=color.green)
plotshape(efsaneIkiVis ? (direction == -1 and direction[1] == 1 ? shortStop : na) : na, title="S A T", style=shape.labeldown, location=location.absolute, size=size.normal, text="SAT", transp=0, textcolor = color.white, color=color.red)
efsaneIkiText = (direction == 1) ? "EFSANE2___: AL \n" : "EFSANE2___: SAT\n"
//----EFSANE2----
//----Fibonacci---
fibVis = input(title="Fibonacci Visible", type=input.bool, defval=true)
FPeriod = input(144, title="Fibonacci Period")
plotF1618 = input(title="Fibonacci Plot 1.618 Level?", type=input.bool, defval=false)
fibThema = input(title = "Fibonacci Thema", defval="Thema1", options = ['Thema1', 'Thema2'])
fibBarCount = input(title="Fibonacci Bar Count", type=input.integer, defval=144, minval=1, maxval=1000)
Fhigh = fibVis ? (highest(FPeriod)) : na
Flow = fibVis ? (lowest(FPeriod)) : na
FH = highestbars(high, FPeriod)
FL = lowestbars(low, FPeriod)
downfibo = FH < FL
F0 = fibVis ? ( downfibo ? Flow : Fhigh ) : na
F236 = fibVis ? ( downfibo ? (Fhigh - Flow) * 0.236 + Flow : Fhigh - (Fhigh - Flow) * 0.236 ) : na
F382 = fibVis ? ( downfibo ? (Fhigh - Flow) * 0.382 + Flow : Fhigh - (Fhigh - Flow) * 0.382 ) : na
F500 = fibVis ? ( downfibo ? (Fhigh - Flow) * 0.500 + Flow : Fhigh - (Fhigh - Flow) * 0.500 ) : na
F618 = fibVis ? ( downfibo ? (Fhigh - Flow) * 0.618 + Flow : Fhigh - (Fhigh - Flow) * 0.618 ) : na
F786 = fibVis ? ( downfibo ? (Fhigh - Flow) * 0.786 + Flow : Fhigh - (Fhigh - Flow) * 0.786 ) : na
F1000 = fibVis ? ( downfibo ? (Fhigh - Flow) * 1.000 + Flow : Fhigh - (Fhigh - Flow) * 1.000 ) : na
F1618 = fibVis ? ( downfibo ? (Fhigh - Flow) * 1.618 + Flow : Fhigh - (Fhigh - Flow) * 1.618 ) : na
Fcolor = downfibo ? #459915 : #266fa3 //#E41019 //
Foffset = downfibo ? FH : FL
var line vpp_p = na
var line vs1_p = na
var line vs2_p = na
var line vs3_p = na
var line vr1_p = na
var line vr2_p = na
var line vr3_p = na
var line vr4_p = na
if bar_index > fibBarCount and fibVis
vpp_p := line.new(bar_index[fibBarCount], F0, bar_index, F0, color=Fcolor, style = line.style_dotted, extend = (fibThema == "Thema1" ? extend.none:extend.both), width=3)
vs1_p := line.new(bar_index[fibBarCount], F236, bar_index, F236, color=Fcolor, style = line.style_dotted, extend = (fibThema == "Thema1" ? extend.none:extend.both), width=2)
vs2_p := line.new(bar_index[fibBarCount], F382, bar_index, F382, color=Fcolor, style = line.style_dotted, extend = (fibThema == "Thema1" ? extend.none:extend.both), width=2)
vs3_p := line.new(bar_index[fibBarCount], F500, bar_index, F500, color=Fcolor, style = line.style_dotted, extend = (fibThema == "Thema1" ? extend.none:extend.both), width=2)
vr1_p := line.new(bar_index[fibBarCount], F618, bar_index, F618, color=Fcolor, style = line.style_dotted, extend = (fibThema == "Thema1" ? extend.none:extend.both), width=3)
vr2_p := line.new(bar_index[fibBarCount], F786, bar_index, F786, color=Fcolor, style = line.style_dotted, extend = (fibThema == "Thema1" ? extend.none:extend.both), width=2)
vr3_p := line.new(bar_index[fibBarCount], F1000, bar_index, F1000, color=Fcolor, style = line.style_dotted, extend = (fibThema == "Thema1" ? extend.none:extend.both), width=3)
vr4_p := (plotF1618 and F1618 ? line.new(bar_index[fibBarCount], F1618, bar_index, F1618, color=Fcolor, style = line.style_dotted, extend = (fibThema == "Thema1" ? extend.none:extend.both), width=2): na)
line.delete(vpp_p[1])
line.delete(vs1_p[1])
line.delete(vs2_p[1])
line.delete(vs3_p[1])
line.delete(vr1_p[1])
line.delete(vr2_p[1])
line.delete(vr3_p[1])
line.delete(vr4_p[1])
plotshape(F0, style=shape.labeldown, location=location.absolute, color=Fcolor, textcolor=color.white, show_last=1, text="0", offset=50, transp=30)
plotshape(F236, style=shape.labeldown, location=location.absolute, color=Fcolor, textcolor=color.white, show_last=1, text="0.236", offset=50, transp=30)
plotshape(F382, style=shape.labeldown, location=location.absolute, color=Fcolor, textcolor=color.white, show_last=1, text="0.382", offset=50, transp=30)
plotshape(F500, style=shape.labeldown, location=location.absolute, color=Fcolor, textcolor=color.white, show_last=1, text="0.5", offset=50, transp=30)
plotshape(F618, style=shape.labeldown, location=location.absolute, color=Fcolor, textcolor=color.white, show_last=1, text="0.618", offset=50, transp=30)
plotshape(F786, style=shape.labeldown, location=location.absolute, color=Fcolor, textcolor=color.white, show_last=1, text="0.786", offset=50, transp=30)
plotshape(F1000, style=shape.labeldown, location=location.absolute, color=Fcolor, textcolor=color.white, show_last=1, text="1", offset=50, transp=30)
plotshape(plotF1618 and F1618 ? F1618 : na, style=shape.labeldown, location=location.absolute, color=Fcolor, textcolor=color.white, show_last=1, text="%161.8", offset=50, transp=30)
plotshape(Flow, style=shape.labelup, location=location.absolute, size=size.small, color=color.red, textcolor=color.black, show_last=1, offset=45, text="Low", transp=50)
plotshape(Fhigh, style=shape.labeldown, location=location.absolute, size=size.small, color=color.red, textcolor=color.black, show_last=1, offset=45,text="High", transp=50)
//----Fibonacci---
//----Üssel Ortalamalar
ema5Vis = input(title="EMA5 Visible", type=input.bool, defval=false)
ema9Vis = input(title="EMA9 Visible", type=input.bool, defval=false)
ema13Vis = input(title="EMA13 Visible", type=input.bool, defval=false)
ema21Vis = input(title="EMA21 Visible", type=input.bool, defval=false)
ema50Vis = input(title="EMA50 Visible", type=input.bool, defval=false)
ema100Vis = input(title="EMA100 Visible", type=input.bool, defval=false)
ema200Vis = input(title="EMA200 Visible", type=input.bool, defval=false)
ema377Vis = input(title="EMA377 Visible", type=input.bool, defval=false)
ema610Vis = input(title="EMA610 Visible", type=input.bool, defval=false)
//ema5 izci içerisinde hesaplandı
plot(ema5Vis ? ema5 : na, color=color.black, linewidth=2, title="EMA-5")
ema9=ema(close, 9)
plot(ema9Vis ? ema9 : na, color=color.purple, linewidth=2, title="EMA-9")
//ema13 izci içerisinde hesaplandı
plot(ema13Vis ? ema13 : na, color=color.teal, linewidth=2, title="EMA-13")
//ema21 izci içerisinde hesaplandı
plot(ema21Vis ? ema21 : na, color=color.red, linewidth=2, title="EMA-21")
ema50=ema(close, 50)
plot(ema50Vis ? ema50 : na, color=color.green, linewidth=2, title="EMA-50")
ema100=ema(close, 100)
plot(ema100Vis ? ema100 : na, color=color.orange, linewidth=2, title="EMA-100")
ema200=ema(close, 200)
plot(ema200Vis ? ema200 : na, color=color.blue, linewidth=2, title="EMA-200")
ema377=ema(close, 377)
plot(ema377Vis ? ema377 : na, color=color.purple, linewidth=2, title="EMA-377")
ema610=ema(close, 610)
plot(ema610Vis ? ema610 : na, color=color.green, linewidth=2, title="EMA-610")
//----Üssel Ortalamalar
//----Ralli Habercisi----
ralliVis = input(title="Ralli Habercisi Visible", type=input.bool, defval=false)
plotshape(cross(ema50, ema200) and ema50[1] < ema200[1] ? true : na, style=shape.diamond, text="GOLDEN\nCROSS", color=#FFD700,size=size.small, location=location.top,transp= (ralliVis ? 0:100))
plotshape(cross(ema21, ema50) and ema21[1] < ema50[1] ? true : na, style=shape.diamond, text="SILVER\nCROSS",color=#0044ff,size=size.small, location=location.bottom,transp=(ralliVis ? 0:100))
plotshape(cross(ema50, ema200) and ema50[1] > ema200[1] ? true : na, style=shape.triangleup, text="DEATH\nCROSS",color=color.black,size=size.small, location=location.bottom,transp=(ralliVis ? 0:100))
//----Ralli Habercisi----
//----MACD----
// Getting inputs
MACDfast_length = input(title="MACD Fast Length", type=input.integer, defval=12)
MACDslow_length = input(title="MACD Slow Length", type=input.integer, defval=26)
MACDsrc = input(title="Source", type=input.source, defval=close)
MACDsignal_length = input(title="MACD Signal Smoothing", type=input.integer, minval = 1, maxval = 50, defval = 9)
MACDsma_source = input(title="MACD Simple MA(Oscillator)", type=input.bool, defval=false)
MACDsma_signal = input(title="MACD Simple MA(Signal Line)", type=input.bool, defval=false)
// Calculating
MACDfast_ma = MACDsma_source ? sma(MACDsrc, MACDfast_length) : ema(MACDsrc, MACDfast_length)
MACDslow_ma = MACDsma_source ? sma(MACDsrc, MACDslow_length) : ema(MACDsrc, MACDslow_length)
macd = MACDfast_ma - MACDslow_ma
signal = MACDsma_signal ? sma(macd, MACDsignal_length) : ema(macd, MACDsignal_length)
macdText = cross(macd,signal) or macd>signal?"MACD_____: AL \n":"MACD_____: SAT\n"
//----MACD----
//----ÖNCÜ----
len = input(9, minval=1, title="Öncü Length")
high_ = highest(hl2, len)
low_ = lowest(hl2, len)
round_(val) => val > .99 ? .999 : val < -.99 ? -.999 : val
value = 0.0
value := round_(.66 * ((hl2 - low_) / max(high_ - low_, .001) - .5) + .67 * nz(value[1]))
fish1 = 0.0
fish1 := .5 * log((1 + value) / max(1 - value, .001)) + .5 * nz(fish1[1])
fish2 = fish1[1]
oncuText=crossover(fish1,fish2) or fish1>fish2?"ÖNCÜ_____: AL \n":"ÖNCÜ_____: SAT\n"
//----ÖNCÜ----
//----ÖNCÜ2----
oncuIkilength = input(5, minval=1, title="ÖNCÜ2 Length")
oncuIkismoothK = input(3, minval=1, title="ÖNCÜ2 smoothK")
oncuIkismoothD = input(3, minval=1, title="ÖNCÜ2 smoothD")
k = ema(stoch(close, high, low, oncuIkilength), oncuIkismoothK)
d = ema(k, oncuIkismoothD)
oncuIkiText=crossover(d, k) or d<k?"ÖNCÜ2____: AL \n":"ÖNCÜ2____: SAT\n"
//----ÖNCÜ2----
//----PAS----
rsi_length = input(defval = 14, title = "PAS RSI Length", type = input.integer, minval = 1)
rsi_smooth_length = input(defval = 9, title = "PAS RSI Smooth Length", type = input.integer, minval = 1)
rsi_threshold_period = input(defval = 25, title = "PAS RSI Period", type = input.integer, minval = 1)
rsi_overbought = input(defval = 0.8, title = "PAS RSI Overbought", type = input.float, minval = 0, maxval = 1)
rsi_oversold = input(defval = 0.2, title = "PAS RSI Oversold ", type = input.float, minval = 0, maxval = 1)
tma_enable = input(defval = true, title = "PAS TMA Enable")
tma_length = input(defval = 3, title = "PAS TMA Length", minval = 2)
tma_factor = input(defval = 1, title = "PAS TMA Factor", step = 0.1, minval = 0.1)
get_ift(values, smooth_length) =>
smoothed = wma(0.1 * values, smooth_length)
(exp(2 * smoothed) - 1) / (exp(2 * smoothed) + 1)
get_gd(values, length, factor) =>
ema(values, length) * (1 + factor) - ema(ema(values, length), length) * factor
get_tma(values, length, factor) =>
get_gd(get_gd(get_gd(values, length, factor), length, factor), length, factor)
values = tma_enable ? get_tma(close, tma_length, tma_factor) : close
rsi = rsi(values, rsi_length)
ift = get_ift(rsi - 50, rsi_smooth_length)
min = lowest(ift, rsi_threshold_period)
max = highest(ift, rsi_threshold_period)
range = max - min
mid = min + 0.5 * range
pasText = ift >= mid?"PAS_______: AL \n":"PAS_______: SAT\n"
//----PAS----
//----TRB----
TTIlength1 = input(14, minval=1, title="TTI")
TTIma_length = input(13, minval=1, title="PMI")
TRBsrc = input(close, title="Source")
TRBma1 = sma(TRBsrc, TTIlength1)
TRBcci1 = (TRBsrc - TRBma1) / (0.040 * dev(TRBsrc, TTIlength1))
trbAl = (TRBcci1 > ema(TRBcci1, TTIma_length)) ?"TRB_______: AL \n":"TRB_______: SAT\n"
trbTrend = TRBcci1 > 0 ? "TRB_______: PT \n":"TRB_______: NT\n"
trbText = trbAl + trbTrend
//----TRB----
//----Aroon----
Aroonlength = input(14, minval=1)
Aroonupper = 100 * (highestbars(high, Aroonlength+1) + Aroonlength)/Aroonlength
Aroonlower = 100 * (lowestbars(low, Aroonlength+1) + Aroonlength)/Aroonlength
aroonText = Aroonupper > Aroonlower or crossover(Aroonupper,Aroonlower)?"AROON____: AL \n":"AROON____: SAT\n"
//----Aroon----
//----RIZA----
rizalen1 = input(title="MA 1", defval = 30)
rizalen2 = input(title="MA 1", defval = 70)
rizash = rsi(close, rizalen1)
rizaln = sma(rizash, rizalen2)
//(rizash[1] < rizaln [1] and rizash > rizaln)
rizaText = (rizash > rizaln) ? "RIZA______: AL \n":"RIZA______: SAT\n"
//----RIZA----
//----Label----
bolme="--------------------"
altSatir="\n"
labelVis = input(defval=true, title="Indicator Panel Visible", type=input.bool)
labelSize = input(title="Indicator Panel Size", defval="Normal", options=["Normal", "Large", "Huge"])
ichimokuLabelVis = input(defval=true, title="Ichimoku Label Visible", type=input.bool)
nkralLabelVis = input(defval=true, title="nKral Label Visible", type=input.bool)
izciLabelVis = input(defval=true, title="İzci Label Visible", type=input.bool)
strLabelVis = input(defval=true, title="Str Label Visible", type=input.bool)
psarLabelVis = input(defval=true, title="Parabolik Sar Label Visible", type=input.bool)
mptLabelVis = input(defval=true, title="MPT55 Label Visible", type=input.bool)
efseneBirLabelVis = input(defval=true, title="Efsane1 Label Visible", type=input.bool)
efseneIkiLabelVis = input(defval=true, title="Efsane2 Label Visible", type=input.bool)
macdLabelVis = input(defval=true, title="Macd Label Visible", type=input.bool)
oncuLabelVis = input(defval=true, title="Öncü Label Visible", type=input.bool)
oncuIkiLabelVis = input(defval=true, title="Öncü2 Label Visible", type=input.bool)
pasLabelVis = input(defval=true, title="Pas Label Visible", type=input.bool)
trbLabelVis = input(defval=true, title="TRB Label Visible", type=input.bool)
aroonLabelVis = input(defval=true, title="Aroon Label Visible", type=input.bool)
rizaLabelVis = input(defval=true, title="Rıza Label Visible", type=input.bool)
var label l = na
if labelVis and barstate.islast
l := label.new(bar_index,na)
label.set_size(l, (labelSize == "Normal" ? size.normal: labelSize == "Large" ? size.large : size.huge))
label.set_style(l, label.style_label_upper_left)
label.set_yloc(l,yloc=yloc.belowbar)
//label.set_xloc(l, leadLine1, xloc=xloc.bar_index)
label.set_text(l, bolme + altSatir + (ichimokuLabelVis ? ( ichimokuText + bolme + altSatir) : "" ) + (nkralLabelVis ? (nkralText) : "" ) + (izciLabelVis ? (izciText) : "" ) + (strLabelVis ? (strText) : "" ) + (psarLabelVis ? (psarText) : "" ) + (mptLabelVis ? (mptText) : "" ) + (efseneBirLabelVis ? (efsaneBirText) : "" ) + (efseneIkiLabelVis ? (efsaneIkiText) : "" ) + (not nkralLabelVis and not izciLabelVis and not strLabelVis and not psarLabelVis and not mptLabelVis and not efseneIkiLabelVis and not efseneBirLabelVis ? "" : (bolme + altSatir)) + (macdLabelVis ? (macdText) : "" ) + (oncuLabelVis ? (oncuText) : "" ) + (oncuIkiLabelVis ? (oncuIkiText) : "" ) + (pasLabelVis ? (pasText) : "") + (trbLabelVis ? (trbText) : "") + (aroonLabelVis ? (aroonText) : "") + (rizaLabelVis ? (rizaText) : "") + (not macdLabelVis and not oncuLabelVis and not oncuIkiLabelVis and not pasLabelVis and not trbLabelVis and not aroonLabelVis and not rizaLabelVis? "" : (bolme)))
label.set_textalign(l,text.align_left)
label.set_textcolor(l,color.white)
label.set_color(l, #459915)
label.set_tooltip(l,"İndikatör Paneli")
label.delete(l[1])
//----Label----
ÖZEL İNDİKATÖR
YENİ MACD İNDİKATÖRÜ
//@version=4
study(title="MACDNEW", shorttitle="MACDNEW", resolution="")
// Getting inputs
fast_length = input(title="Fast Length", type=input.integer, defval=12)
slow_length = input(title="Slow Length", type=input.integer, defval=26)
src = input(title="Source", type=input.source, defval=close)
signal_length = input(title="Signal Smoothing", type=input.integer, minval = 1, maxval = 50, defval = 9)
sma_source = input(title="Oscillator MA Type", type=input.string, defval="EMA", options=["SMA", "EMA"])
sma_signal = input(title="Signal Line MA Type", type=input.string, defval="EMA", options=["SMA", "EMA"])
// Plot colors
col_macd = input(#2962FF, "MACD Line ", input.color, group="Color Settings", inline="MACD")
col_signal = input(#FF6D00, "Signal Line ", input.color, group="Color Settings", inline="Signal")
col_grow_above = input(#26A69A, "Above Grow", input.color, group="Histogram", inline="Above")
col_fall_above = input(#B2DFDB, "Fall", input.color, group="Histogram", inline="Above")
col_grow_below = input(#FFCDD2, "Below Grow", input.color, group="Histogram", inline="Below")
col_fall_below = input(#FF5252, "Fall", input.color, group="Histogram", inline="Below")
// Calculating
fast_ma = sma_source == "SMA" ? sma(src, fast_length) : ema(src, fast_length)
slow_ma = sma_source == "SMA" ? sma(src, slow_length) : ema(src, slow_length)
macd = fast_ma - slow_ma
signal = sma_signal == "SMA" ? sma(macd, signal_length) : ema(macd, signal_length)
hist = macd - signal
plot(hist, title="Histogram", style=plot.style_columns, color=(hist>=0 ? (hist[1] < hist ? col_grow_above : col_fall_above) : (hist[1] < hist ? col_grow_below : col_fall_below)))
plot(macd, title="MACD", color=col_macd)
plot(signal, title="Signal", color=col_signal)
plotshape(cross(macd, signal) and macd[1] < signal[1] ? true : na, style=shape.triangleup, text="A", color=color.green, size=size.tiny, location=location.bottom, transp=0)
plotshape(cross(macd, signal) and macd[1] > signal[1] ? true : na, style=shape.triangledown, text="S", color=color.red, size=size.tiny, location=location.top, transp=0)
//cross_1 = cross(macd, signal)
//barcolor(cross(macd, signal) and macd[1] < signal[1] ? color.blue : cross_1 and macd[1] > signal[1] ? color.black : close < open ? color.red : color.green)
ÖZEL İNDİKATÖR
PARA AVCISI İNDİKATÖRÜ
//@version=3
study(title="PARA AVCISI", shorttitle="PARA AVCISI", overlay=true)
TF= input(title='A', type=resolution, defval="D")
ATRlength = input(title="B", type=integer, defval=60, minval=2, maxval=100)
SMAlength = input(title="C", type=integer, defval=5, minval=2, maxval=100)
SMACurTFlength = input(title="D", type=integer, defval=20, minval=2, maxval=100)
HIGH = security(tickerid, TF, high)
LOW = security(tickerid, TF, low)
CLOSE = security(tickerid, TF, close)
ATR = security(tickerid, TF, atr(ATRlength))
SMA = security(tickerid, TF, sma(close, SMAlength))
SMACurTF = sma(close, SMACurTFlength)
RENKOUP = na
RENKODN = na
H = na
COLOR = na
BUY = na
SELL = na
UP = na
DN = na
CHANGE = na
RENKOUP := na(RENKOUP[1]) ? ((HIGH+LOW)/2)+(ATR/2) : RENKOUP[1]
RENKODN := na(RENKOUP[1]) ? ((HIGH+LOW)/2)-(ATR/2) : RENKODN[1]
H := na(RENKOUP[1]) or na(RENKODN[1]) ? RENKOUP-RENKODN : RENKOUP[1]-RENKODN[1]
COLOR := na(COLOR[1]) ? white : COLOR[1]
BUY := na(BUY[1]) ? 0 : BUY[1]
SELL := na(SELL[1]) ? 0 : SELL[1]
UP := false
DN := false
CHANGE := false
if(not CHANGE and close >= RENKOUP[1]+H*3)
CHANGE := true
UP := true
RENKOUP := RENKOUP[1]+ATR*3
RENKODN := RENKOUP[1]+ATR*2
COLOR := lime
SELL := 0
BUY := BUY+3
if(not CHANGE and close >= RENKOUP[1]+H*2)
CHANGE := true
UP := true
RENKOUP := RENKOUP[1]+ATR*2
RENKODN := RENKOUP[1]+ATR
COLOR := lime
SELL := 0
BUY := BUY+2
if(not CHANGE and close >= RENKOUP[1]+H)
CHANGE := true
UP := true
RENKOUP := RENKOUP[1]+ATR
RENKODN := RENKOUP[1]
COLOR := lime
SELL := 0
BUY := BUY+1
if(not CHANGE and close <= RENKODN[1]-H*3)
CHANGE := true
DN := true
RENKODN := RENKODN[1]-ATR*3
RENKOUP := RENKODN[1]-ATR*2
COLOR := red
BUY := 0
SELL := SELL+3
if(not CHANGE and close <= RENKODN[1]-H*2)
CHANGE := true
DN := true
RENKODN := RENKODN[1]-ATR*2
RENKOUP := RENKODN[1]-ATR
COLOR := red
BUY := 0
SELL := SELL+2
if(not CHANGE and close <= RENKODN[1]-H)
CHANGE := true
DN := true
RENKODN := RENKODN[1]-ATR
RENKOUP := RENKODN[1]
COLOR := red
BUY := 0
SELL := SELL+1
plotshape(UP, style=shape.arrowup, location=location.abovebar, size=size.normal)
plotshape(DN, style=shape.arrowdown, location=location.belowbar, size=size.normal)
alertcondition(UP, title='New UP green level', message='New UP green level reached')
alertcondition(DN, title='New DN red level', message='New DN red level reached')
plot(SMA, title='C')
plot(SMACurTF, title='D', color=#ffaa00)
p1=plot(RENKOUP, style=circles, linewidth=1, color=COLOR)
p2=plot(RENKODN, style=circles, linewidth=1, color=COLOR)
fill(p1, p2, color=COLOR, transp=80)
ÖZEL İNDİKATÖR
SON MOHİKAN
//@version=4
study(title="MACDNEW", shorttitle="MACDNEW", resolution="")
// Getting inputs
fast_length = input(title="Fast Length", type=input.integer, defval=12)
slow_length = input(title="Slow Length", type=input.integer, defval=26)
src = input(title="Source", type=input.source, defval=close)
signal_length = input(title="Signal Smoothing", type=input.integer, minval = 1, maxval = 50, defval = 9)
sma_source = input(title="Oscillator MA Type", type=input.string, defval="EMA", options=["SMA", "EMA"])
sma_signal = input(title="Signal Line MA Type", type=input.string, defval="EMA", options=["SMA", "EMA"])
// Plot colors
col_macd = input(#2962FF, "MACD Line ", input.color, group="Color Settings", inline="MACD")
col_signal = input(#FF6D00, "Signal Line ", input.color, group="Color Settings", inline="Signal")
col_grow_above = input(#26A69A, "Above Grow", input.color, group="Histogram", inline="Above")
col_fall_above = input(#B2DFDB, "Fall", input.color, group="Histogram", inline="Above")
col_grow_below = input(#FFCDD2, "Below Grow", input.color, group="Histogram", inline="Below")
col_fall_below = input(#FF5252, "Fall", input.color, group="Histogram", inline="Below")
// Calculating
fast_ma = sma_source == "SMA" ? sma(src, fast_length) : ema(src, fast_length)
slow_ma = sma_source == "SMA" ? sma(src, slow_length) : ema(src, slow_length)
macd = fast_ma - slow_ma
signal = sma_signal == "SMA" ? sma(macd, signal_length) : ema(macd, signal_length)
hist = macd - signal
plot(hist, title="Histogram", style=plot.style_columns, color=(hist>=0 ? (hist[1] < hist ? col_grow_above : col_fall_above) : (hist[1] < hist ? col_grow_below : col_fall_below)))
plot(macd, title="MACD", color=col_macd)
plot(signal, title="Signal", color=col_signal)
plotshape(cross(macd, signal) and macd[1] < signal[1] ? true : na, style=shape.triangleup, text="A", color=color.green, size=size.tiny, location=location.bottom, transp=0)
plotshape(cross(macd, signal) and macd[1] > signal[1] ? true : na, style=shape.triangledown, text="S", color=color.red, size=size.tiny, location=location.top, transp=0)
//cross_1 = cross(macd, signal)
//barcolor(cross(macd, signal) and macd[1] < signal[1] ? color.blue : cross_1 and macd[1] > signal[1] ? color.black : close < open ? color.red : color.green)