PHP Code:
//@version=6
indicator("(.)", overlay=true)
// ==========================================
// 1. AYARLAR VE VİTES KUTUSU
// ==========================================
string mod_secimi = input.string(defval="(Scalp 1dk)", title="Sürüş Modu", options=["(Scalp 1dk)", "(Trade 5-15dk)", "(Trend 1s+)"])
// Değişkenleri Tanımla (Varsayılan: Scalp değerleri)
// --- YAVAŞ MOTOR AYARLARI (Omurga) ---
float ss1_st = 0.02, float ss1_inc = 0.02, float ss1_max = 0.2
float ss2_st = 0.015, float ss2_inc = 0.015, float ss2_max = 0.15
float ss3_st = 0.01, float ss3_inc = 0.01, float ss3_max = 0.1
// --- HIZLI MOTOR AYARLARI (Nitro) ---
float fs1_st = 0.08, float fs1_inc = 0.05, float fs1_max = 0.2
float fs2_st = 0.01, float fs2_inc = 0.05, float fs2_max = 0.2
float fs3_st = 0.04, float fs3_inc = 0.04, float fs3_max = 0.2
// MODA GÖRE MOTOR AYARLARINI DEĞİŞTİR
if mod_secimi == "(Scalp 1dk)"
// Senin verdiğin Özel Scalp Ayarları (Çok Agresif)
// Yavaş Motor (Daha sıkı takip)
ss1_st := 0.02, ss1_inc := 0.02, ss1_max := 0.2
ss2_st := 0.015, ss2_inc := 0.015, ss2_max := 0.15
ss3_st := 0.01, ss3_inc := 0.01, ss3_max := 0.1
// Hızlı Motor (Tam Gaz)
fs1_st := 0.08, fs1_inc := 0.05, fs1_max := 0.2
fs2_st := 0.01, fs2_inc := 0.05, fs2_max := 0.2
fs3_st := 0.04, fs3_inc := 0.04, fs3_max := 0.2
else if mod_secimi == "(Trade 5-15dk)"
// Dengeli Ayarlar (Biraz daha gevşek)
// Yavaş Motor
ss1_st := 0.02, ss1_inc := 0.02, ss1_max := 0.2
ss2_st := 0.01, ss2_inc := 0.01, ss2_max := 0.1
ss3_st := 0.005, ss3_inc := 0.005, ss3_max := 0.1
// Hızlı Motor (Daha az gürültülü)
fs1_st := 0.02, fs1_inc := 0.02, fs1_max := 0.2
fs2_st := 0.02, fs2_inc := 0.03, fs2_max := 0.2
fs3_st := 0.02, fs3_inc := 0.04, fs3_max := 0.2
else // Trend 1s+
// Geniş Ayarlar (Uzun vade)
// Yavaş Motor (Çok geriden gelir, ana destek olur)
ss1_st := 0.01, ss1_inc := 0.01, ss1_max := 0.1
ss2_st := 0.005, ss2_inc := 0.005, ss2_max := 0.1
ss3_st := 0.002, ss3_inc := 0.002, ss3_max := 0.05
// Hızlı Motor (Normal SAR gibi davranır)
fs1_st := 0.02, fs1_inc := 0.02, fs1_max := 0.2
fs2_st := 0.02, fs2_inc := 0.02, fs2_max := 0.2
fs3_st := 0.02, fs3_inc := 0.02, fs3_max := 0.2
// ==========================================
// 2. MOTORLARI ÇALIŞTIR (HESAPLAMA)
// ==========================================
// A. YAVAŞ MOTOR (DİZEL) - Ana Omurga
s_slow_1 = ta.sar(ss1_st, ss1_inc, ss1_max)
s_slow_2 = ta.sar(ss2_st, ss2_inc, ss2_max)
s_slow_3 = ta.sar(ss3_st, ss3_inc, ss3_max)
// Yavaş Merkez (Ağırlık Merkezi)
avg_slow = (s_slow_1 + s_slow_2 + s_slow_3) / 3
// B. HIZLI MOTOR (JET) - Scalp / Momentum
s_fast_1 = ta.sar(fs1_st, fs1_inc, fs1_max)
s_fast_2 = ta.sar(fs2_st, fs2_inc, fs2_max)
s_fast_3 = ta.sar(fs3_st, fs3_inc, fs3_max)
// Hızlı Merkez (Ağırlık Merkezi)
avg_fast = (s_fast_1 + s_fast_2 + s_fast_3) / 3
// ==========================================
// 3. GÖRSELLEŞTİRME
// ==========================================
// YAVAŞ MOTOR (Mavi Tonları - Güven)
// "Artı" (+) işaretiyle sağlamlığı temsil eder.
plot(s_slow_1, "Yavaş 1", style=plot.style_cross, color=color.new(color.navy, 20), linewidth=1)
plot(s_slow_2, "Yavaş 2", style=plot.style_cross, color=color.new(color.blue, 20), linewidth=1)
plot(s_slow_3, "Yavaş 3", style=plot.style_cross, color=color.new(color.aqua, 20), linewidth=1)
// HIZLI MOTOR (Sıcak Tonlar - Hız)
// "Daire" (o) işaretiyle tekerlek/hız temsil eder.
plot(s_fast_1, "Hızlı 1", style=plot.style_circles, color=color.new(color.red, 0), linewidth=1)
plot(s_fast_2, "Hızlı 2", style=plot.style_circles, color=color.new(color.orange, 0), linewidth=1)
plot(s_fast_3, "Hızlı 3", style=plot.style_circles, color=color.new(color.yellow, 0), linewidth=1)
// ==========================================
// 4. MOTORLAR ARASI GERİLİM (VAKUM)
// ==========================================
// İki motorun merkezi arasındaki alanı boyuyoruz.
// Hızlı motor, Yavaş motorun üzerindeyse YEŞİL (Ralli Modu).
// Hızlı motor, Yavaş motorun altındaysa KIRMIZI (Çöküş Modu).
p_slow = plot(avg_slow, "Yavaş Merkez", display=display.none)
p_fast = plot(avg_fast, "Hızlı Merkez", display=display.none)
fill(p_slow, p_fast, color=avg_fast > avg_slow ? color.new(color.green, 85) : color.new(color.red, 85), title="Motor Arası Gerilim")
// ==========================================
// 5. KOKPİT (BİLGİ EKRANI)
// ==========================================
var table panel = table.new(position.bottom_right, 2, 3, bgcolor=color.new(color.black, 50))
if barstate.islast
table.cell(panel, 0, 0, "MOTOR MODU:", text_color=color.gray, text_size=size.small)
table.cell(panel, 1, 0, mod_secimi, text_color=color.white, text_size=size.small)
// Motor Durumu
string durum = avg_fast > avg_slow ? "TURBO (AL)" : "FREN (SAT)"
color c_durum = avg_fast > avg_slow ? color.lime : color.red
table.cell(panel, 0, 1, "DURUM:", text_color=color.gray, text_size=size.small)
table.cell(panel, 1, 1, durum, text_color=c_durum, text_size=size.small)
//////////////////
// ==========================================
// 1. AYARLAR
// ==========================================
// Buradan atmosferin ne kadar geniş veya dar olacağını seçebilirsin.
float ayar_genislik = input.float(0.5, "Atmosfer Genişliği (0.1 - 2.0)", minval=0.1, maxval=2.0, step=0.1)
// ==========================================
// 2. ÇEKİRDEK HESAPLAMA
// ==========================================
s1 = ta.sar(0.08, 0.05, 0.2)
s2 = ta.sar(0.01, 0.05, 0.2)
s3 = ta.sar(0.04, 0.04, 0.2)
avg_sar = (s1 + s2 + s3) / 3
f_mirror(_sar, _len) =>
float _delta = math.abs(close - _sar)
float _raw = close > _sar ? close + _delta : close - _delta
ta.linreg(_raw, _len, 0)
m1 = f_mirror(s1, 20)
m2 = f_mirror(s2, 20)
m3 = f_mirror(s3, 20)
avg_mir = (m1 + m2 + m3) / 3
// ==========================================
// 3. YAPAY ZEKA (DL) MODÜLÜ
// ==========================================
tanh(v) => (1 - math.exp(-2 * v)) / (1 + math.exp(-2 * v))
td(s) => nz((s - nz(s[1])) / nz(s[1]))
var w_c = array.from(22.4271, -26.6917, 4.9371, 9.0349, -10.6929, -38.2880, 10.0500, -44.7063, -17.8163, 30.5662, -33.9954, 14.5017, -43.2865, -13.3874, 24.7080, -14.3929, 28.4830, -22.9793, -7.6582, -5.6505, 28.8379, -26.3544, 0.5206, 25.0049, -17.8832, -4.8113, -4.0364, -8.3327, -1.1571, 0.4667, -22.0533, 3.6525, -4.3904, 2.1030, 20.0272, 11.5101, -0.4150)
n_in = array.from(tanh(td(open)), tanh(td(high)), tanh(td(low)), tanh(td(close)))
f_calc_dl(n_arr, w_arr) =>
float out = 0.0
for i = 0 to 5
float s = 0.0
for j = 0 to 3
s += array.get(n_arr, j) * array.get(w_arr, (i * 5) + j)
out += tanh(s + array.get(w_arr, (i * 5) + 4)) * array.get(w_arr, 30 + i)
tanh(out + array.get(w_arr, 36))
float dl_val = f_calc_dl(n_in, w_c)
// ==========================================
// 4. ATMOSFER (KONTROLLÜ & PÜRÜZSÜZ)
// ==========================================
// AI Faktörü + Kullanıcı Ayarı
// math.abs(dl_val) 0 ile 1 arasındadır. Bunu yumuşatıp ayar ile çarpıyoruz.
float ai_factor = (0.2 + (math.abs(dl_val) * 0.5)) * ayar_genislik
// Hesaplamalar
// Her katman bir öncekinin üstüne biner.
float dist_1 = math.abs(close - s1) * ai_factor
float l1_top = close + dist_1
float l1_bot = close - dist_1
float dist_2 = math.abs(s1 - s2) * ai_factor
float l2_top = l1_top + dist_2
float l2_bot = l1_bot - dist_2
float dist_3 = math.abs(s2 - s3) * ai_factor
float l3_top = l2_top + dist_3
float l3_bot = l2_bot - dist_3
// Çizim (Pürüzsüz Dolgu)
// Katman 3 (Dış - Kırmızı)
p3_top = plot(l3_top, "Atmosfer 3 Üst", display=display.none)
p3_bot = plot(l3_bot, "Atmosfer 3 Alt", display=display.none)
fill(p3_top, p3_bot, color=color.new(color.red, 85), title="Atmosfer 3 Dolgu")
// Katman 2 (Orta - Mavi)
p2_top = plot(l2_top, "Atmosfer 2 Üst", display=display.none)
p2_bot = plot(l2_bot, "Atmosfer 2 Alt", display=display.none)
fill(p2_top, p2_bot, color=color.new(color.blue, 80), title="Atmosfer 2 Dolgu")
// Katman 1 (İç - Sarı)
p1_top = plot(l1_top, "Atmosfer 1 Üst", display=display.none)
p1_bot = plot(l1_bot, "Atmosfer 1 Alt", display=display.none)
fill(p1_top, p1_bot, color=color.new(color.yellow, 75), title="Atmosfer 1 Dolgu")
// ==========================================
// 5. KALKAN GÜCÜ (MUM BOYAMA)
// ==========================================
int kalkan = 0
if close > s1
kalkan += 1
if close > s2
kalkan += 1
if close > s3
kalkan += 1
if close < s1 and close < avg_sar
kalkan += 1
if close < s2 and close < avg_sar
kalkan += 1
if close < s3 and close < avg_sar
kalkan += 1
color bar_col = na
if kalkan >= 3
bar_col := close > avg_sar ? color.rgb(0, 230, 119, 100) : color.rgb(255, 82, 82, 100)
else if kalkan == 2
bar_col := color.blue
else
bar_col := color.fuchsia
barcolor(bar_col)
//////////////////////
// Atmosfer Çizimi (En altta kalsın diye önce çiziyoruz)
plotcandle(l3_bot, l3_top, l3_bot, l3_top, "3", color=color.new(color.red, 70), bordercolor=na, wickcolor=na)
plotcandle(l2_bot, l2_top, l2_bot, l2_top, "2", color=color.new(color.blue, 70), bordercolor=na, wickcolor=na)
plotcandle(l1_bot, l1_top, l1_bot, l1_top, "1", color=color.new(color.yellow, 70), bordercolor=na, wickcolor=na)
// ==========================================
// 4. SİNYAL MANTIĞI (BEYİN)
// ==========================================
// A. TERS PULLBACK (P ve X)
// Güç Metriği
float p_sar = ta.hma((close - avg_sar) / syminfo.mintick, 200)
float p_mir = ta.hma((avg_mir - close) / syminfo.mintick, 50)
// Olaylar
bool ev_pull_buy = p_sar < 0 and ta.crossunder(p_mir, p_sar) and p_mir < 0
bool ev_pull_sell = p_sar > 0 and ta.crossover(p_mir, p_sar) and p_mir > 0
bool ev_trend_up = ta.crossover(p_sar, 0)
bool ev_trend_dn = ta.crossunder(p_sar, 0)
// B. 3'LÜ KİLİT (ELMAS - Büyük Dönüş)
bool tam_kilit = (math.abs(s1 - s2) < syminfo.mintick) and (math.abs(s2 - s3) < syminfo.mintick)
// SİNYAL KİLİDİ (NO-REPAINT)
bool sig_p_buy = ev_pull_buy and barstate.isconfirmed
bool sig_p_sell = ev_pull_sell and barstate.isconfirmed
bool sig_tr_up = ev_trend_up and barstate.isconfirmed
bool sig_tr_dn = ev_trend_dn and barstate.isconfirmed
bool sig_lock_buy = tam_kilit and close > avg_sar and barstate.isconfirmed
bool sig_lock_sell = tam_kilit and close < avg_sar and barstate.isconfirmed
// ==========================================
// 5. GÖRSELLEŞTİRME (SİNYALLER)
// ==========================================
// Elmas (Nadir ve Güçlü)
plotshape(sig_lock_buy, "KİLİT LONG", shape.diamond, location.belowbar, color=color.white, size=size.small)
plotshape(sig_lock_sell, "KİLİT SHORT", shape.diamond, location.abovebar, color=color.white, size=size.small)
// Pullback (Fırsat) - "P"
//plotshape(sig_p_buy, "PULLBACK LONG", shape.labelup, location.belowbar, color=color.lime, text="P\nL", textcolor=color.white, size=size.tiny)
//plotshape(sig_p_sell, "PULLBACK SHORT", shape.labeldown, location.abovebar, color=color.red, text="P\nS", textcolor=color.white, size=size.tiny)
// Trend (Değişim) - "X"
//plotshape(sig_tr_up, "TREND BAŞLADI", shape.xcross, location.belowbar, color=color.green, size=size.small)
//plotshape(sig_tr_dn, "TREND BİTTİ", shape.xcross, location.abovebar, color=color.maroon, size=size.small)
// Öncü Hat (Rehber)
float oncu = f_mirror(s1, 21)
float oncu1 = f_mirror(s1, 55)
plot(oncu, "21", color=oncu > close ? color.white : color.white, linewidth=2)
plot(oncu1, "55", color=oncu > close ? color.red : color.red, linewidth=2)
// ==========================================
Yer İmleri