PHP Code:
//@version=6
indicator(".", overlay=true, max_labels_count=500, max_lines_count=500, max_bars_back=500)
// ==========================================
// 1. AYARLAR (GİRDİLER)
// ==========================================
// --- Aİ Ayarları ---
sar_start = input.float(0.02, "SAR Başlangıç", step=0.01, group="Aİ Ayarları")
sar_inc = input.float(0.02, "SAR Artış", step=0.01, group="Aİ Ayarları")
sar_max = input.float(0.2, "SAR Maks", step=0.01, group="Aİ Ayarları")
col_0_up = input.color(color.rgb(0, 0, 0), "1-0 Yükseliş Rengi", group="Aİ Ayarları")
col_0_dn = input.color(color.white, "1-0 Düşüş Rengi", group="Aİ Ayarları")
// --- JayRogers Future Lines Ayarları ---
INP_offsetTime = input.int(-20, "Zaman Ofseti (Bar)", group="Future Lines (JayRogers)")
INP_fastLength = input.int(1, "Hızlı SMA Uzunluğu", minval=1, group="Future Lines (JayRogers)")
INP_slowLength = input.int(201, "Yavaş SMA Uzunluğu", minval=1, group="Future Lines (JayRogers)")
INP_vertLength = input.int(1, "Dikey Çizgi Çarpanı", group="Future Lines (JayRogers)")
// ==========================================
// 2. TEMEL MATEMATİK & FONKSİYONLAR
// ==========================================
// Aİ Fonksiyonları
tanh(v) => (1 - math.exp(-2 * v)) / (1 + math.exp(-2 * v))
td(s) => nz((s - nz(s[1])) / nz(s[1]))
calc_dl(float[] n_arr, float[] w_arr) =>
h = array.new_float(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)
array.push(h, tanh(s + array.get(w_arr, (i * 5) + 4)))
float out = array.get(w_arr, 36)
for i = 0 to 5
out += array.get(h, i) * array.get(w_arr, 30 + i)
tanh(out)
// JayRogers Zaman Ofset Fonksiyonu
f_offsetTime(_userOffsetInput) =>
int _timeNow = time
int _timeSeg = time - time[1]
int _segMult = _timeSeg * _userOffsetInput
_timeNow + _segMult
// ==========================================
// 3. Aİ HESAPLAMALARI (DL & SAR)
// ==========================================
// Ağırlıklar
w_o = array.from(0.0305, 5.1130, -26.0857, -5.3202, 7.3547, 4.1679, 7.2258, -0.8712, -8.8945, -7.0647, -0.8062, -0.3044, -3.9097, -5.0099, 5.1275, -29.7360, 28.6684, 0.1384, -57.5885, 2.8249, -0.4293, 0.4827, -0.7897, -2.9874, -4.3107, 1.7583, -0.6180, 2.4493, -1.5831, 1.1658, -0.6530, -4.6469, -1.6789, -17.0776, 0.8754, -6.6724, 6.9407)
w_h = array.from(10.1865, -30.9648, 21.6723, -40.8958, 7.9574, -15.2523, 14.8454, 10.6214, -23.8178, 2.9475, -15.1790, -30.0118, 35.6504, -61.4804, 3.8985, 35.6564, -11.1343, -28.0715, 2.9239, -1.8057, 3.4623, -13.6440, -30.2263, -1.0839, 23.0328, -47.2658, 19.0218, 10.5652, -27.5207, 6.9475, -0.6965, -1.3494, 27.2629, -1.0423, -0.5401, -10.7355, 1.3032)
w_l = array.from(4.3631, -18.3014, -15.3768, 21.2085, -0.4581, -2.6518, 5.2054, -5.9209, -4.8474, 8.3155, 13.8853, -5.5179, -15.2411, -8.6732, -4.9540, 10.4904, -25.2015, 10.2621, -1.1161, -5.2541, -14.6877, 9.0302, -17.3324, 8.0680, 0.7551, 0.8951, -1.7377, 4.8991, -7.7184, 5.4936, 4.1329, -17.5015, 4.6174, -28.4768, -5.8882, -24.4345, 41.3187)
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_v(p, w, div, n_arr) => p * (1 - (calc_dl(n_arr, w) - td(p) * div) / div)
// DL Verileri
o100 = f_v(open, w_o, 100, n_in), h100 = f_v(high, w_h, 100, n_in), l100 = f_v(low, w_l, 100, n_in), c100 = f_v(close, w_c, 100, n_in)
o1000 = f_v(open, w_o, 1000, n_in), c1000 = f_v(close, w_c, 1000, n_in)
// SAR Verileri
psar_fast = ta.sar(sar_start, sar_inc, sar_max)
psar_mid = ta.sar(sar_start / 2, sar_inc / 2, sar_max)
psar_slow = ta.sar(sar_start / 4, sar_inc / 4, sar_max)
// ==========================================
// 4. JAYROGERS FUTURE LINES HESAPLAMA
// ==========================================
_fastMA = ta.sma(close[1], INP_fastLength)
_slowMA = ta.sma(close[1], INP_slowLength)
// Hatlar için değişkenler
var line _fastExtention = na
var line _slowExtention = na
// Zaman Ofseti
int _offsetTime = f_offsetTime(INP_offsetTime)
// ==========================================
// 5. GÖRSELLEŞTİRME (Aİ)
// ==========================================
// --- A. SARlar ---
active_crayon = close > psar_fast ? #48fb01 : #ff0000
plot(psar_fast, "Hızlı", style=plot.style_cross, color=active_crayon, linewidth=1)
plot(psar_mid, "Orta", style=plot.style_circles, color=color.new(active_crayon, 50), linewidth=1)
plot(psar_slow, "Yavaş", style=plot.style_linebr, color=color.new(active_crayon, 80), linewidth=1)
// --- B. DL Barlar ---
plotcandle(o100, h100, l100, c100, "5", color=c100 > c100[1] ? color.rgb(243, 244, 237, 95) : color.rgb(248, 4, 4, 95), bordercolor=color.new(#000000, 45))
plotcandle(f_v(open,w_o,250,n_in), f_v(high,w_h,250,n_in), f_v(low,w_l,250,n_in), f_v(close,w_c,250,n_in), "4", color=na, bordercolor=color.new(color.yellow, 35))
plotcandle(f_v(open,w_o,500,n_in), f_v(high,w_h,500,n_in), f_v(low,w_l,500,n_in), f_v(close,w_c,500,n_in), "3", color=na, bordercolor=color.new(color.lime, 25))
plotcandle(f_v(open,w_o,750,n_in), f_v(high,w_h,750,n_in), f_v(low,w_l,750,n_in), f_v(close,w_c,750,n_in), "2", color=na, bordercolor=color.new(color.white, 15))
isBull1000 = c1000 > o1000
plotcandle(o1000 + (c1000 - o1000) * 0.33, f_v(high,w_h,1000,n_in), f_v(low,w_l,1000,n_in), o1000 + (c1000 - o1000) * 0.66, "1", color=color.new(isBull1000 ? color.lime : color.red, 00), bordercolor=color.new(color.fuchsia, 100))
// --- C. 1-0 Mühürleri ---
isClosed = barstate.isconfirmed
spaceUp = (high - close) * 0.35
spaceDown = (open - low) * 0.35
bullRaw = isClosed and close[1] < open[1] and close < open and close < low[1]
bearRaw = isClosed and close[1] > open[1] and close > open and close > high[1]
if bullRaw
label.new(bar_index - 1, high[1] + spaceUp, '0', style=label.style_none, textcolor=col_0_up, size=size.huge)
label.new(bar_index - 1, high + spaceUp, 'o', style=label.style_none, textcolor=col_0_up, size=size.huge)
if bearRaw
label.new(bar_index - 1, low[1] - spaceDown, '0', style=label.style_none, textcolor=col_0_dn, size=size.huge)
label.new(bar_index - 1, low - spaceDown, 'o', style=label.style_none, textcolor=col_0_dn, size=size.huge)
// ==========================================
// 6. GÖRSELLEŞTİRME (JAYROGERS FUTURE LINES)
// ==========================================
// Hızlı SMA Çizgisi
if na(_fastExtention)
_fastExtention := line.new(time, _fastMA, _offsetTime, _fastMA, xloc.bar_time, extend.none)
line.set_xy1(_fastExtention, time, _fastMA)
line.set_xy2(_fastExtention, _offsetTime, _fastMA)
line.set_color(_fastExtention, color.aqua)
line.set_width(_fastExtention, 3)
// Yavaş SMA Çizgisi
if na(_slowExtention)
_slowExtention := line.new(time, _slowMA, _offsetTime, _slowMA, xloc.bar_time, extend.none)
line.set_xy1(_slowExtention, time, _slowMA)
line.set_xy2(_slowExtention, _offsetTime, _slowMA)
line.set_color(_slowExtention, color.aqua)
line.set_width(_slowExtention, 3)
// Dikey Çizgiler ve Etiketler (Extra Fluff)
var line _startLineVertical = na
var line _finishLineVertical = na
float _min = math.min(_fastMA, _slowMA)
float _max = math.max(_fastMA, _slowMA)
float _len = (_max - _min)
float _top = _max + (_len * INP_vertLength)
float _bot = _min - (_len * INP_vertLength)
if na(_startLineVertical)
_startLineVertical := line.new(time, _top, time, _bot, xloc.bar_time, extend.none)
line.set_xy1(_startLineVertical, time, _top)
line.set_xy2(_startLineVertical, time, _bot)
if na(_finishLineVertical)
_finishLineVertical := line.new(_offsetTime, _top, _offsetTime, _bot, xloc.bar_time, extend.none)
line.set_xy1(_finishLineVertical, _offsetTime, _top)
line.set_xy2(_finishLineVertical, _offsetTime, _bot)
var label _offsetLabel = na
string _direction = INP_offsetTime > 0 ? " İleri" : INP_offsetTime < 0 ? " Geri" : ""
string _labelText = str.tostring(INP_offsetTime) + " " + _direction + " "
if na(_offsetLabel)
_offsetLabel := label.new(_offsetTime, _top, _labelText, xloc.bar_time)
label.set_xy(_offsetLabel, _offsetTime, _top)
label.set_text(_offsetLabel, _labelText)
label.set_style(_offsetLabel, INP_vertLength >= 0 ? label.style_label_down : label.style_label_up)
// ==========================================
// 7. İMZA TABLOSU
// ==========================================
var table tb = table.new(position.bottom_right, 1, 1, bgcolor = #161114)
if barstate.islast
sarTxt = "H: " + str.tostring(psar_fast, format.mintick) + " | O: " + str.tostring(psar_mid, format.mintick) + " | Y: " + str.tostring(psar_slow, format.mintick)
finalTxt = sarTxt + " | YATIRIM TAVSİYESİ OLARAK KULLANILAMAZ. | @yörük@ 2026"
table.cell(tb, 0, 0, finalTxt, text_color = color.white, text_size = size.large)
Yer İmleri