PHP Code:
//@version=6
indicator(".", overlay=true)
// ==========================================
// 1. AYARLAR
// ==========================================
float ayar_genislik = input.float(1.0, "Atmosfer Geniþliði (0.1 - 2.0)", minval=0.1, maxval=2.0, step=0.1)
// ==========================================
// 2. MOTOR BLOKLARI (PARAMETRELER)
// ==========================================
// --- A. YAVAÞ MOTOR (Ana Trend / Omurga) ---
float s_slow_1 = ta.sar(0.02, 0.02, 0.2)
float s_slow_2 = ta.sar(0.015, 0.015, 0.15)
float s_slow_3 = ta.sar(0.01, 0.01, 0.1)
// --- B. HIZLI MOTOR (Scalp / Nitro) ---
float s_fast_1 = ta.sar(0.08, 0.05, 0.2) // Hýzlý Referans
float s_fast_2 = ta.sar(0.01, 0.05, 0.2)
float s_fast_3 = ta.sar(0.04, 0.04, 0.2)
float avg_fast = (s_fast_1 + s_fast_2 + s_fast_3) / 3
// ==========================================
// 3. YAPAY ZEKA (DL) MODÜLÜ (ATMOSFER ESNEKLÝÐÝ)
// ==========================================
tanh_fn(v) => (1 - math.exp(-2 * v)) / (1 + math.exp(-2 * v))
td_fn(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_fn(td_fn(open)), tanh_fn(td_fn(high)), tanh_fn(td_fn(low)), tanh_fn(td_fn(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_fn(s + array.get(w_arr, (i * 5) + 4)) * array.get(w_arr, 30 + i)
tanh_fn(out + array.get(w_arr, 36))
float dl_val = f_calc_dl(n_in, w_c)
float ai_factor = (0.2 + (math.abs(dl_val) * 0.5)) * ayar_genislik
// ==========================================
// 4. DÝNAMÝK RENKLÝ ATMOSFER (ÇEKÝRDEK)
// ==========================================
// Hýzlý SAR'larýn Durum Kontrolü
bool all_fast_below = (close > s_fast_1) and (close > s_fast_2) and (close > s_fast_3) // Hepsi altta (TAM GAZ AL)
bool all_fast_above = (close < s_fast_1) and (close < s_fast_2) and (close < s_fast_3) // Hepsi üstte (TAM GAZ SAT)
// Atmosfer Rengi Belirleme
color core_color = all_fast_below ? color.new(color.green, 75) :
all_fast_above ? color.new(color.red, 75) :
color.new(color.yellow, 75)
// Atmosfer Sýnýrlarý ve Çizimi
float dist_1 = math.abs(close - s_fast_1) * ai_factor
float l1_top = close + dist_1
float l1_bot = close - dist_1
p1_top = plot(l1_top, "Atmosfer Üst", display=display.none)
p1_bot = plot(l1_bot, "Atmosfer Alt", display=display.none)
fill(p1_top, p1_bot, color=core_color, title="Dinamik Çekirdek Atmosferi")
// ==========================================
// 5. KALKAN GÜCÜ (MUM BOYAMA)
// ==========================================
int kalkan = 0
if close > s_fast_1
kalkan += 1
if close > s_fast_2
kalkan += 1
if close > s_fast_3
kalkan += 1
if close < s_fast_1 and close < avg_fast
kalkan += 1
if close < s_fast_2 and close < avg_fast
kalkan += 1
if close < s_fast_3 and close < avg_fast
kalkan += 1
color bar_col = na
if kalkan >= 3
bar_col := close > avg_fast ? color.rgb(0, 230, 119, 00) : color.rgb(255, 82, 82, 00)
else if kalkan == 2
bar_col := color.blue
else
bar_col := color.fuchsia
barcolor(bar_col)
// ==========================================
// 6. AYNA (MIRROR) HESAPLAMALARI
// ==========================================
f_mirror(_sar, _sm) =>
float _delta = math.abs(close - _sar)
float _raw = close > _sar ? close + _delta : close - _delta
ta.hma(_raw, _sm) // Akýcý kývrýmlar için HMA
// Yavaþ Aynalar (Daha pürüzsüz)
float m_slow_1 = f_mirror(s_slow_1, 14)
float m_slow_2 = f_mirror(s_slow_2, 14)
float m_slow_3 = f_mirror(s_slow_3, 14)
// Hýzlý Aynalar (Daha reaktif)
float m_fast_1 = f_mirror(s_fast_1, 7)
float m_fast_2 = f_mirror(s_fast_2, 7)
float m_fast_3 = f_mirror(s_fast_3, 7)
// ==========================================
// 7. GÖRSELLEÞTÝRME (SAR VE AYNA ÇÝZÝMLERÝ)
// ==========================================
// YAVAÞ MOTOR VE AYNALARI
plot(s_slow_1, "4", style=plot.style_cross, color=color.new(color.white, 00), linewidth=2)
plot(s_slow_2, "5", style=plot.style_cross, color=color.new(color.white, 00), linewidth=2)
plot(s_slow_3, "6", style=plot.style_cross, color=color.new(color.white, 00), linewidth=2)
plot(m_slow_1, "+4", color=color.new(color.white, 0), linewidth=1)
plot(m_slow_2, "+5", color=color.new(color.white, 0), linewidth=1)
plot(m_slow_3, "+6", color=color.new(color.white, 0), linewidth=1)
// HIZLI MOTOR VE AYNALARI
plot(s_fast_1, "1", style=plot.style_cross, color=color.new(color.yellow, 0), linewidth=2)
plot(s_fast_2, "2", style=plot.style_cross, color=color.new(color.yellow, 0), linewidth=2)
plot(s_fast_3, "3", style=plot.style_cross, color=color.new(color.yellow, 0), linewidth=2)
plot(m_fast_1, "+1", color=color.new(color.yellow, 0), linewidth=1)
plot(m_fast_2, "+2", color=color.new(color.yellow, 0), linewidth=1)
plot(m_fast_3, "+3", color=color.new(color.yellow, 0), linewidth=1)
// ÝMZA
var table ytd_table = table.new(position.bottom_center, 1, 1)
if barstate.islast
table.cell(ytd_table, 0, 0, "(AÝ) eðitim çalýþmasýdýr. Yatýrým tavsiyesi KULLANILAMAZ.", text_color=color.new(color.white, 50), text_size=size.small)
bu kalýpta...dinamik hesaplama deðiþtirmeye örnek kalýptýr...
Yer Ýmleri