PHP Code:
//@version=6

  ////
UV ta.sar(0.010.020.2)
OV ta.sar(0.010.040.4)
OV1 ta.sar(0.10.040.4)

plot(UVtitle '4'style plot.style_crosscolor renk UV close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth 1)
plot(OVtitle '2'style plot.style_crosscolor renk OV close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth 1)
plot(OV1title '1'style plot.style_crosscolor renk OV1 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth 1)

kv ta.sar(0.010.060.6)
kv1 input.timeframe(title 'Timeframe'defval '1')
kv15 input.timeframe(title 'Timeframe'defval '15')
kv60 input.timeframe(title 'Timeframe'defval '60')
kv240 input.timeframe(title 'Timeframe'defval '240')
kvD input.timeframe(title 'Timeframe'defval 'D')
s1 request.security(syminfo.tickeridkv1kvgaps barmerge.gaps_on)
s15 request.security(syminfo.tickeridkv15kvgaps barmerge.gaps_on)
s60 request.security(syminfo.tickeridkv60kvgaps barmerge.gaps_on)
s240 request.security(syminfo.tickeridkv240kvgaps barmerge.gaps_on)
sD request.security(syminfo.tickeridkvDkvgaps barmerge.gaps_on)

plot(s1title 'TR1'style plot.style_linecolor renk s1 close color.rgb(24733100) : color.rgb(242504100) : color.silverlinewidth 1)
plot(s15title 'TR15'style plot.style_linecolor renk s15 close color.rgb(24733100) : color.rgb(242504100) : color.silverlinewidth 1)
plot(s60title 'TR60'style plot.style_linecolor renk s60 close color.rgb(24733100) : color.rgb(242504100) : color.silverlinewidth 1)
plot(s240title 'TR240'style plot.style_linecolor renk s240 close color.rgb(24733100) : color.rgb(242504100) : color.silverlinewidth 1)
plot(sDtitle 'TRG'style plot.style_linecolor renk sD close color.rgb(24733100) : color.rgb(242504100) : color.silverlinewidth 1)

a1 ta.sar(0.0.0430.34)
a2 ta.sar(0.10.0.34)
a3 ta.sar(0.10.010.5)
a4 ta.sar(0.010.0.1)
a5 ta.sar(0.0.040.4)
a6 ta.sar(0.0.030.3)
a7 ta.sar(0.0.020.2)
a8 ta.sar(0.0.010.1)


//plot(a1, title='6', style=plot.style_stepline, color=renk ? a1 > close ? color.rgb(247, 3, 3, 00) : color.rgb(24, 250, 4, 00) : color.silver, linewidth=1)
//plot(a2, title='4', style=plot.style_stepline, color=renk ? a2 > close ? color.rgb(247, 3, 3, 00) : color.rgb(24, 250, 4, 00) : color.silver, linewidth=1)
plot(a3title '3'style plot.style_crosscolor renk a3 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth 1)
//plot(a4, title='7', style=plot.style_stepline, color=renk ? a4 > close ? color.rgb(247, 3, 3, 00) : color.rgb(24, 250, 4, 00) : color.silver, linewidth=1)
plot(a5title '2'style plot.style_crosscolor renk a5 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth 1)
//plot(a6, title='2', style=plot.style_stepline, color=renk ? a6 > close ? color.rgb(247, 3, 3, 00) : color.rgb(24, 250, 4, 00) : color.silver, linewidth=1)
plot(a7title '5'style plot.style_crosscolor renk a7 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth 1)
//plot(a8, title='0', style=plot.style_stepline, color=renk ? a8 > close ? color.rgb(247, 3, 3, 00) : color.rgb(24, 250, 4, 00) : color.silver, linewidth=1)

//@version=6
mt input.timeframe('D'title 'S/R timeframe')
sh input.int(10title 'Shift S/R Forward/Backward')
start input.float(title 'Start'step 0.01defval 0.02)
increment input.float(title 'Increment'step 0.01defval 0.02)
maximum input.float(title 'Maximum'step 0.01defval 0.2)

sar request.security(syminfo.tickeridmtta.sar(startincrementmaximum))
plot(sarstyle plot.style_circleslinewidth 1,title '@yörük@'color #e302fc00)
dir sar close : -1

buy 
dir == and dir[1] == -1
sell 
dir == -and dir[1] == 1

ta.valuewhen(buyclose0)
ta.valuewhen(sellclose0)
buyalert open and close and open[1] < h
sellalert 
open and close and open[1] > h


ta.valuewhen(buyclose[0], 0)
plot(ycolor #0abbc400, linewidth = 1, title = 'Yüksek', offset = sh)

ta.valuewhen(sellclose[0], 0)
plot(zcolor #e4f00600, linewidth = 1, title = 'Düşük', offset = sh)


//@version=6

pSARbeginningValue input.int(2minval 0maxval 10title 'PSAR Beginning Value')
pSARendValue input.int(2minval 1maxval 10title 'PSAR End Value')
pSARmultiplierValue input.int(2minval 0maxval 10title ' PSAR Multiplier Value')

pSARbeginningMethod pSARbeginningValue .01
pSARendMethod 
pSARendValue .10
pSARmultiplierMethod 
pSARmultiplierValue .01

pSAR_UpValue 
ta.sar(pSARbeginningMethodpSARmultiplierMethodpSARendMethod)
pSAR_DownValue ta.sar(pSARbeginningMethodpSARmultiplierMethodpSARendMethod)

pSAR_UpColor close >= pSAR_DownValue color.white na
pSAR_DownColor 
close <= pSAR_UpValue color.fuchsia na

plot
(bool(pSAR_UpValue) ? pSAR_UpValue nastyle plot.style_linebrcolor pSAR_UpColorlinewidth 1title 'PSAR')
plot(bool(pSAR_DownValue) ? pSAR_DownValue nastyle plot.style_linebrcolor pSAR_DownColorlinewidth 1title 'PSAR')

//5 HMA - These 5 HMAs are used to see the crossover and the strength of the candle. But only 2 HMAs are used to determine the candles

showHMA1 input(falsetitle 'Hull Moving Average - Tiny')
showHMA2 input(truetitle 'Hull Moving Average - Lower Period')
showHMA3 input(truetitle 'Hull Moving Average - Medium Period')
showHMA4 input(falsetitle 'Hull Moving Average - Intermediate')
showHMA5 input(falsetitle 'Hull Moving Average - Long Term')
showSMA1 input(falsetitle 'Simple Moving Average - Medium Term')

hmaPeriodOne input(10'HMA Tiny Period')
hmaPeriodTwo input(20'HMA Lower Period')
hmaPeriodThree input(50'HMA Medium Period')
hmaPeriodFour input(100'HMA Intermediate Period')
hmaPeriodFive input(200'HMA Long Period')

hmaOne ta.hma(input(close), hmaPeriodOne)
hmaTwo ta.hma(input(close), hmaPeriodTwo)
hmaThree ta.hma(input(close), hmaPeriodThree)
hmaFour ta.hma(input(close), hmaPeriodFour)
hmaFive ta.hma(input(close), hmaPeriodFive)

//1 SMA - Single Moving Average Medium Term

smaPeriodOne input(50'SMA Medium Period')
smaOne ta.sma(input(close), smaPeriodOne)
plot(showSMA1 and bool(smaOne) ? smaOne nacolor color.new(color.red0), linewidth 2title 'SMA Medium Period')

//Bar Color
candleClose close hmaTwo : -1
isInBetween 
close hmaTwo and close hmaThree or close hmaTwo and close hmaThree

isNeutral 
close pSAR_DownValue and candleClose == -or close pSAR_DownValue and candleClose == 1

barcolor
(isNeutral or isInBetween color.yellow candleClose == -color.red candleClose == color.green color.black)


start1 input(0.02)
increment1 input(0.02)
maximum1 input(0.2)
xo input(0.10)
xpr input(0.01)

psar 0.0 // PSAR
af 0.0 // Acceleration Factor
trend_dir // Current direction of PSAR
ep 0.0 // Extreme point

sar_long_to_short trend_dir[1] == and close <= psar[1] * (xo// PSAR switches from long to short and exceeds xo filter
sar_short_to_long trend_dir[1] == -and close >= psar[1] * (xo// PSAR switches from short to long and exceeds xo filter

trend_change barstate.isfirst[1] or sar_long_to_short or sar_short_to_long

// Calculate trend direction
trend_dir := barstate.isfirst[1] and close[1] > open[1] ? barstate.isfirst[1] and close[1] <= open[1] ? -sar_long_to_short ? -sar_short_to_long nz(trend_dir[1])

// Calculate  Acceleration Factor
af := trend_change start1 trend_dir == and high ep[1] or trend_dir == -and low ep[1] ? math.min(maximum1af[1] + increment1) : af[1]

// Calculate extreme point
ep := trend_change and trend_dir == high trend_change and trend_dir == -low trend_dir == math.max(ep[1], high * (xpr)) : math.min(ep[1], low * (xpr))

// Calculate PSAR
psar := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change ep[1] : trend_dir == psar[1] + af * (ep psar[1]) : psar[1] - af * (psar[1] - ep)

plot(psarstyle plot.style_circlescolor trend_dir == color.white color.fuchsia,title "Karşıt",linewidth 2)




pSARbeginningValue1 input.int(2minval 0maxval 10title 'PSAR başlangıç değeri')
pSARendValue1 input.int(2minval 1maxval 10title 'PSAR bitiş değeri')
pSARmultiplierValue1 input.int(2minval 0maxval 10title ' PSAR katsayi değeri')

pSARbeginningMethod1 pSARbeginningValue1 .01
pSARendMethod1 
pSARendValue1 .10
pSARmultiplierMethod1 
pSARmultiplierValue1 .01

pSAR_UpValue1 
ta.sar(pSARbeginningMethod1pSARmultiplierMethod1pSARendMethod1)
pSAR_DownValue1 ta.sar(pSARbeginningMethod1pSARmultiplierMethod1pSARendMethod1)

pSAR_UpColor1 close >= pSAR_DownValue1 color.green na
pSAR_DownColor1 
close <= pSAR_UpValue1 color.red na

zoneSource 
input(hl2title 'Kaynak')
src input(hl2title 'Kaynak')
zoneLength input(defval 10title 'ATR Alan Uzunluğu')
zoneMultiplier input.float(defval 3.0step 0.1title 'ATR Alan Katsayısı')
zoneATR ta.atr(zoneLength)

downZone zoneSource zoneMultiplier zoneATR
downZoneNew 
nz(downZone[1], downZone)
downZone := close[1] < downZoneNew math.min(downZonedownZoneNew) : downZone
upZone 
zoneSource zoneMultiplier zoneATR
upZoneNew 
nz(upZone[1], upZone)
upZone := close[1] > upZoneNew math.max(upZoneupZoneNew) : upZone

zoneDecider 
1
zoneDecider 
:= nz(zoneDecider[1], zoneDecider)
zoneDecider := zoneDecider == -and close downZoneNew zoneDecider == and close upZoneNew ? -zoneDecider

redZone 
zoneDecider == -and zoneDecider[1] == 1
greenZone 
zoneDecider == and zoneDecider[1] == -1
downZoneColor 
zoneDecider == -color.red color.gray
upZoneColor 
zoneDecider == color.green color.gray

downZonePlot 
plot(zoneDecider == na downZonestyle plot.style_linebrlinewidth 2color color.new(color.red100), title 'Düşüş')

upZonePlot plot(zoneDecider == upZone nastyle plot.style_linebrlinewidth 2color color.new(color.green100), title 'Yükseliş')

aldigimfiyat str.tostring(ta.valuewhen(greenZonezoneSource0))
sattigimfiyat str.tostring(ta.valuewhen(redZonezoneSource0))

Buy greenZone
Sell 
redZone
if greenZone == bool(1)
    
l2 label.new(bar_indexna)
    
label.set_text(l2aldigimfiyat)
    
label.set_color(l2color.green)
    
label.set_yloc(l2yloc.belowbar)
    
label.set_style(l2label.style_label_up)
if 
redZone == bool(1)
    
l2 label.new(bar_indexna)
    
label.set_text(l2sattigimfiyat)
    
label.set_color(l2color.red)
    
label.set_yloc(l2yloc.abovebar)
    
label.set_style(l2label.style_label_down)

//neutralZonePlot = plot(ohlc4, style = plot.style_circles, linewidth = math.max(1, 0), title = 'Stop')