PHP Code:
// © Kinetik Komuta Merkezi [V13.2 - Estetik & Renk Kodlu Terminal]
//@version=6
indicator("@yφrόk@ 2026", overlay = true, max_lines_count = 500)
// ─────────────────────────────────────────────────────────────────
// 0. GέRDέLER VE RENK PALETέ
// ─────────────────────────────────────────────────────────────────
group_dash = "Gφsterge Paneli (Dashboard)"
bool show_dash = input.bool(true, "Paneli Gφster", group=group_dash)
string dash_pos = input.string("Top Right", "Panel Konumu", options=["Top Right", "Top Left", "Bottom Right", "Bottom Left"], group=group_dash)
group_motor = "Ηift Motor & Bulut"
int len_fast = input.int(5, "Hύzlύ Motor (Zemin 1)", group=group_motor)
int len_slow = input.int(20, "Yavaώ Motor (Zemin 2)", group=group_motor)
group_kin = "Kinetik Renkler"
col_up1 = input.color(#00e676, "Boπa Ana", group=group_kin)
col_dn1 = input.color(#ff1744, "Ayύ Ana", group=group_kin)
col_flat= input.color(#edf506, "Flat (Bulut έηi)", group=group_kin)
color col_cloud_up = color.new(#00e676, 75)
color col_cloud_dn = color.new(#ff1744, 75)
group_stat = "1σ έstatistiksel Hedef"
int volLength = input.int(20, "Volatilite Periyodu", group=group_stat)
int projBars = input.int(15, "έleriye Dφnόk Mum (T)", group=group_stat)
int barsPerYear = input.int(5000, "Yύllύk Mum (1dk=525600)", group=group_stat)
group_ayna = "Makro Duvarlar (Yin-Yang Ayna)"
float h_start = input.float(0.06, "Hύzlύ SAR Baώlangύη", step=0.01, group=group_ayna)
float h_inc = input.float(0.06, "Hύzlύ SAR έvme", step=0.01, group=group_ayna)
float h_max = input.float(0.30, "Hύzlύ SAR Max", step=0.1, group=group_ayna)
int pivot_len = input.int(10, "Duvar Tespiti (Pivot Uzunluπu)", group=group_ayna)
// ─────────────────────────────────────────────────────────────────
// 1. MOTOR: ΗέFT ZEMέN (KέNETέK BULUT VE MUM RENGέ)
// ─────────────────────────────────────────────────────────────────
float mid_fast = ta.hma(ta.median(hl2, len_fast * 2), 10)
float mid_slow = ta.hma(ta.median(hl2, len_slow * 2), 10)
bool is_bull_trend = mid_fast > mid_slow
bool is_bear_trend = mid_fast < mid_slow
//p_fast = plot(mid_fast, color=color.rgb(247, 223, 6, 100), linewidth=1, title="Hύzlύ Zemin", display=display.pane)
//p_slow = plot(mid_slow, color=color.new(#03d9f5, 100), linewidth=1, title="Yavaώ Zemin", display=display.pane)
////fill(p_fast, p_slow, is_bull_trend ? col_cloud_up : col_cloud_dn, title="Kinetik Bulut")
float cloud_top = math.max(mid_fast, mid_slow)
float cloud_bot = math.min(mid_fast, mid_slow)
color bar_col = close > cloud_top ? col_up1 : close < cloud_bot ? col_dn1 : col_flat
//barcolor(bar_col)
// ─────────────────────────────────────────────────────────────────
// 2. MOTOR: 3'Lά SAR (TAKTέKSEL 1-2-3 HEDEFLERέ)
// ─────────────────────────────────────────────────────────────────
float sar_a = ta.sar(0.02, 0.02, 0.2)
float sar_b = ta.sar(0.01, 0.01, 0.1)
float sar_c = ta.sar(0.005, 0.005, 0.05)
float t_up1 = ta.hma(close + math.abs(close - sar_a), 10)
float t_up2 = ta.hma(close + math.abs(close - sar_b), 10)
float t_up3 = ta.hma(close + math.abs(close - sar_c), 10)
float t_dn1 = ta.hma(close - math.abs(close - sar_a), 10)
float t_dn2 = ta.hma(close - math.abs(close - sar_b), 10)
float t_dn3 = ta.hma(close - math.abs(close - sar_c), 10)
bool hit_u3 = ta.crossover(high, t_up3) and is_bull_trend
bool hit_u2 = ta.crossover(high, t_up2) and is_bull_trend and not hit_u3
bool hit_u1 = ta.crossover(high, t_up1) and is_bull_trend and not hit_u2 and not hit_u3
bool hit_d3 = ta.crossunder(low, t_dn3) and is_bear_trend
bool hit_d2 = ta.crossunder(low, t_dn2) and is_bear_trend and not hit_d3
bool hit_d1 = ta.crossunder(low, t_dn1) and is_bear_trend and not hit_d2 and not hit_d3
plot(hit_u1 ? t_up1 : na, style=plot.style_circles, linewidth=2, color=col_up1, display=display.pane)
plot(hit_u2 ? t_up2 : na, style=plot.style_circles, linewidth=3, color=col_up1, display=display.pane)
plot(hit_u3 ? t_up3 : na, style=plot.style_circles, linewidth=4, color=col_up1, display=display.pane)
plot(hit_d1 ? t_dn1 : na, style=plot.style_circles, linewidth=2, color=col_dn1, display=display.pane)
plot(hit_d2 ? t_dn2 : na, style=plot.style_circles, linewidth=3, color=col_dn1, display=display.pane)
plot(hit_d3 ? t_dn3 : na, style=plot.style_circles, linewidth=4, color=col_dn1, display=display.pane)
plotchar(hit_u1, char="1", location=location.abovebar, color=col_up1, size=size.tiny, display=display.pane)
plotchar(hit_u2, char="2", location=location.abovebar, color=col_up1, size=size.tiny, display=display.pane)
plotchar(hit_u3, char="3", location=location.abovebar, color=col_up1, size=size.tiny, display=display.pane)
plotchar(hit_d1, char="1", location=location.belowbar, color=col_dn1, size=size.tiny, display=display.pane)
plotchar(hit_d2, char="2", location=location.belowbar, color=col_dn1, size=size.tiny, display=display.pane)
plotchar(hit_d3, char="3", location=location.belowbar, color=col_dn1, size=size.tiny, display=display.pane)
var float bull_seal_price = na
var float bear_seal_price = na
var line bull_seal = na
var line bear_seal = na
if hit_u3
bull_seal_price := high
if not na(bull_seal)
line.delete(bull_seal)
bull_seal := line.new(bar_index, high, bar_index + 1, high, color=color.rgb(4, 250, 131, 100), width=1, style=line.style_dashed, extend=extend.right)
if hit_d3
bear_seal_price := low
if not na(bear_seal)
line.delete(bear_seal)
bear_seal := line.new(bar_index, low, bar_index + 1, low, color=color.rgb(249, 4, 4, 100), width=1, style=line.style_dashed, extend=extend.right)
// ─────────────────────────────────────────────────────────────────
// 3. MOTOR: 5'Lέ SAR ΗAKIήMASI (ELMAS TETέK)
// ─────────────────────────────────────────────────────────────────
float s1 = ta.sar(0.0, 0.001, 0.02)
float s2 = ta.sar(0.0, 0.002, 0.02)
float s3 = ta.sar(0.0, 0.003, 0.02) // Mavi
float s4 = ta.sar(0.0, 0.0001, 0.02) // Sarύ
float s5 = ta.sar(0.001, 0.00001, 0.02) // Fuώya
// SAR Ηizimleri Ekrana Dφndό (Sol Menόden Gizli)
//plot(s3, "1 (SAR Mavi)", color=color.new(#04effb, 0), linewidth=1, style=plot.style_cross, display=display.pane)
//plot(s4, "2 (SAR Sarύ)", color=color.new(color.yellow, 0), linewidth=1, style=plot.style_cross, display=display.pane)
//plot(s5, "3 (SAR Fuώya)", color=color.new(color.fuchsia, 0), linewidth=1, style=plot.style_cross, display=display.pane)
isEq(v1, v2) => math.abs(v1 - v2) <= syminfo.mintick
isEq3(v1, v2, v3) => isEq(v1, v2) and isEq(v1, v3)
c1 = isEq3(s1, s2, s3)
c2 = isEq3(s1, s2, s4)
c3 = isEq3(s1, s2, s5)
c4 = isEq3(s1, s3, s4)
c5 = isEq3(s1, s3, s5)
c6 = isEq3(s1, s4, s5)
c7 = isEq3(s2, s3, s4)
c8 = isEq3(s2, s3, s5)
c9 = isEq3(s2, s4, s5)
c10 = isEq3(s3, s4, s5)
any3 = c1 or c2 or c3 or c4 or c5 or c6 or c7 or c8 or c9 or c10
float matchVal = na
if c1 or c2 or c3 or c4 or c5 or c6
matchVal := s1
else if c7 or c8 or c9
matchVal := s2
else if c10
matchVal := s3
trigger = any3 and not any3[1]
isSupport = close > matchVal
diamondColor = isSupport ? color.rgb(0, 230, 118, 50) : color.rgb(255, 23, 68, 50)
//plotshape(trigger ? matchVal : na, "3'lό SAR Elmasύ", shape.diamond, location.absolute, color=diamondColor, size=size.normal, display=display.pane)
var float last_diamond_price = na
var int last_diamond_dir = 0
if trigger
last_diamond_price := matchVal
last_diamond_dir := isSupport ? 1 : -1
// ─────────────────────────────────────────────────────────────────
// 4. MOTOR: έSTATέSTέKSEL VOLATέLέTE (KUTUP YILDIZI)
// ─────────────────────────────────────────────────────────────────
logReturn = math.log(close / nz(close[1], close))
rawVol = ta.stdev(logReturn, volLength)
annualVol = rawVol * math.sqrt(barsPerYear)
conePrice(float basePrice, float vol, int t, float sigmaMultiplier, int direction) =>
drift = direction * sigmaMultiplier * vol * math.sqrt(float(t) / float(barsPerYear))
basePrice * math.exp(drift)
var label[] sigmaLabels = array.new<label>()
var line[] sigmaLines = array.new<line>()
if barstate.islast
if sigmaLabels.size() > 0
for i = 0 to sigmaLabels.size() - 1
label.delete(sigmaLabels.get(i))
line.delete(sigmaLines.get(i))
sigmaLabels.clear()
sigmaLines.clear()
float tip1up = conePrice(close, annualVol, projBars, 1.0, 1)
float tip1dn = conePrice(close, annualVol, projBars, 1.0, -1)
int tipX = bar_index + projBars
if is_bull_trend
sigmaLabels.push(label.new(tipX, tip1up, "YTD.\n" + str.tostring(tip1up, format.mintick), color=color.new(col_up1, 80), textcolor=col_up1, style=label.style_label_left, size=size.small))
sigmaLines.push(line.new(bar_index, close, tipX, tip1up, color=color.new(col_up1, 50), style=line.style_dotted))
else if is_bear_trend
sigmaLabels.push(label.new(tipX, tip1dn, "YTD.\n" + str.tostring(tip1dn, format.mintick), color=color.new(col_dn1, 80), textcolor=col_dn1, style=label.style_label_left, size=size.small))
sigmaLines.push(line.new(bar_index, close, tipX, tip1dn, color=color.new(col_dn1, 50), style=line.style_dotted))
// ─────────────────────────────────────────────────────────────────
// 5. MOTOR: YέN-YANG AYNASI VE MAKRO DUVARLAR
// ─────────────────────────────────────────────────────────────────
f_ozel_sar(src_h, src_l, _start, _inc, _max, _reset_hiz) =>
var int trend = 0
var float sar_val = 0.0
var float ep = 0.0
var float af = 0.0
if trend == 0 and not na(src_h[1])
trend := src_h >= src_h[1] or src_l >= src_l[1] ? 1 : -1
sar_val := trend > 0 ? src_l[1] : src_h[1]
ep := trend > 0 ? src_h[1] : src_l[1]
af := _start
else
if _reset_hiz
af := _start
float nextsar = sar_val
if trend > 0
if src_h[1] > ep
ep := src_h[1]
af := math.min(_max, af + _inc)
nextsar := sar_val + af * (ep - sar_val)
nextsar := math.min(math.min(src_l[1], src_l[2]), nextsar)
if nextsar > src_l
trend := -1
nextsar := ep
ep := src_l
af := _start
else
if src_l[1] < ep
ep := src_l[1]
af := math.min(_max, af + _inc)
nextsar := sar_val + af * (ep - sar_val)
nextsar := math.max(math.max(src_h[1], src_h[2]), nextsar)
if nextsar < src_h
trend := 1
nextsar := ep
ep := src_h
af := _start
sar_val := nextsar
[sar_val, trend]
bool yeni_gun = ta.change(time("W")) != 0
[sar_hizli, trend_hizli] = f_ozel_sar(high, low, h_start, h_inc, h_max, yeni_gun)
float ayna_hizli = trend_hizli > 0 ? close + math.abs(close - sar_hizli) : close - math.abs(close - sar_hizli)
float ph_ayna = ta.pivothigh(ayna_hizli, pivot_len, pivot_len)
float pl_ayna = ta.pivotlow(ayna_hizli, pivot_len, pivot_len)
var array<line> macro_up_walls = array.new<line>()
var array<line> macro_dn_walls = array.new<line>()
// ZARέF DOKUNUή: style=line.style_dotted olarak deπiώtirildi
if not na(ph_ayna)
line w_up = line.new(bar_index[pivot_len], ph_ayna, bar_index, ph_ayna, color=col_up1, width=1, style=line.style_dotted, extend=extend.right)
array.push(macro_up_walls, w_up)
if array.size(macro_up_walls) > 2
line.delete(array.shift(macro_up_walls))
if not na(pl_ayna)
line w_dn = line.new(bar_index[pivot_len], pl_ayna, bar_index, pl_ayna, color=col_dn1, width=1, style=line.style_dotted, extend=extend.right)
array.push(macro_dn_walls, w_dn)
if array.size(macro_dn_walls) > 2
line.delete(array.shift(macro_dn_walls))
plot(ayna_hizli, "Ayna", color=color.new(color.gray, 00), linewidth=1, display=display.pane)
// ─────────────────────────────────────────────────────────────────
// 6. GΦRSEL MOTOR: VERέ TERMέNALέ (DASHBOARD)
// ─────────────────────────────────────────────────────────────────
var pos = dash_pos == "Top Right" ? position.top_right : dash_pos == "Top Left" ? position.top_left : dash_pos == "Bottom Right" ? position.bottom_right : position.bottom_left
var table dash = table.new(pos, 4, 10, border_width = 1, border_color = color.new(#363a45, 50), frame_color = color.new(#363a45, 50), frame_width = 1, bgcolor = color.new(#131722, 10))
if show_dash and barstate.islast
// Baώlύk
table.cell(dash, 0, 0, "GEMέNέ PRO ΗALIήMASIDIR. @yφrόk@ 2026", text_color=color.white, text_halign=text.align_center, bgcolor=color.new(#2962ff, 50), text_size=size.small)
table.merge_cells(dash, 0, 0, 3, 0)
// Fiyat ve Zeminler (Hύzlύ/Yavaώ)
table.cell(dash, 0, 1, "Fiyat | Hύz | Denge", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(dash, 1, 1, str.tostring(close, format.mintick), text_color=color.white, text_size=size.small, text_halign=text.align_center)
table.cell(dash, 2, 1, str.tostring(mid_fast, format.mintick), text_color=color.yellow, text_size=size.small, text_halign=text.align_center)
table.cell(dash, 3, 1, str.tostring(mid_slow, format.mintick), text_color=color.aqua, text_size=size.small, text_halign=text.align_center)
// 3 Mόhrό (Duvarlar)
string txt_bull_seal = na(bull_seal_price) ? "-" : str.tostring(bull_seal_price, format.mintick)
string txt_bear_seal = na(bear_seal_price) ? "-" : str.tostring(bear_seal_price, format.mintick)
table.cell(dash, 0, 2, "Sayύm 3 (Son)", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(dash, 1, 2, "SS\n" + txt_bull_seal, text_color=col_up1, text_size=size.small)
table.cell(dash, 2, 2, "LS\n" + txt_bear_seal, text_color=col_dn1, text_size=size.small)
table.merge_cells(dash, 2, 2, 3, 2)
// Boπa Hedefleri (Yeώil)
table.cell(dash, 0, 3, "Boπa Hedefleri 1-2-3", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(dash, 1, 3, str.tostring(t_up1, format.mintick), text_color=col_up1, text_size=size.small)
table.cell(dash, 2, 3, str.tostring(t_up2, format.mintick), text_color=col_up1, text_size=size.small)
table.cell(dash, 3, 3, str.tostring(t_up3, format.mintick), text_color=col_up1, text_size=size.small)
// Ayύ Hedefleri (Kύrmύzύ)
table.cell(dash, 0, 4, "Ayύ Hedefleri 1-2-3", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(dash, 1, 4, str.tostring(t_dn1, format.mintick), text_color=col_dn1, text_size=size.small)
table.cell(dash, 2, 4, str.tostring(t_dn2, format.mintick), text_color=col_dn1, text_size=size.small)
table.cell(dash, 3, 4, str.tostring(t_dn3, format.mintick), text_color=col_dn1, text_size=size.small)
// 3'lό SAR Motoru
table.cell(dash, 0, 5, "Scalping (H-O-Y)", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(dash, 1, 5, str.tostring(sar_a, format.mintick), text_color=color.silver, text_size=size.small)
table.cell(dash, 2, 5, str.tostring(sar_b, format.mintick), text_color=color.silver, text_size=size.small)
table.cell(dash, 3, 5, str.tostring(sar_c, format.mintick), text_color=color.silver, text_size=size.small)
// YENέ GάNCELLEME: Mavi, Sarύ, Fuώya Kendi Renkleriyle Tabloda!
table.cell(dash, 0, 6, "Swing (H-O-Y)", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(dash, 1, 6, str.tostring(s3, format.mintick), text_color=color.new(#04fbea, 0), text_size=size.small)
table.cell(dash, 2, 6, str.tostring(s4, format.mintick), text_color=color.new(color.yellow, 0), text_size=size.small)
table.cell(dash, 3, 6, str.tostring(s5, format.mintick), text_color=color.new(color.fuchsia, 0), text_size=size.small)
// Son Elmas Deπeri ve Rengi
string txt_elmas = na(last_diamond_price) ? "-" : str.tostring(last_diamond_price, format.mintick)
color col_elmas = last_diamond_dir == 1 ? col_up1 : last_diamond_dir == -1 ? col_dn1 : color.gray
table.cell(dash, 0, 7, "Son Sar Ηakύώmasύ", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(dash, 1, 7, txt_elmas, text_color=col_elmas, text_size=size.small, text_halign=text.align_center)
table.merge_cells(dash, 1, 7, 3, 7)
// Makro Ayna Deπeri
table.cell(dash, 0, 8, "Olasύlύk", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(dash, 1, 8, str.tostring(ayna_hizli, format.mintick), text_color=color.new(#d500f9, 0), text_size=size.small, text_halign=text.align_center)
table.merge_cells(dash, 1, 8, 3, 8)
// Alt Bilgi
table.cell(dash, 0, 9, "Yatύrύm tavsiyesi DEΠέLDέR.", text_color=color.new(color.white, 0), text_size=size.small)
table.merge_cells(dash, 0, 9, 3, 9)
Yer έmleri