PHP Code:
//@version=5
indicator("Aİ", overlay = true, behind_chart = false, max_lines_count=500, max_labels_count=500, max_polylines_count=100, max_boxes_count=100, max_bars_back = 500)
/////////////////////////////////////
// --- Derin Öğrenme ve Bar Hesaplamaları ---
src7778 = close, o7778 = open, h7778 = high, l7778 = low, c7778 = close
tangentdiff(_src8) => nz((_src8 - _src8[1]) / _src8[1])
ActivationFunctionTanh(v1) => (1 - math.exp(-2 * v1)) / (1 + math.exp(-2 * v1))
_indicator18 = (o7778 - o7778[1]) / o7778[1]
_indicator28 = (h7778 - h7778[1]) / h7778[1]
n_08 = ActivationFunctionTanh(_indicator18), n_18 = ActivationFunctionTanh(_indicator28)
f_open8 = o7778 * (1 - (ActivationFunctionTanh(0.03 * n_08 + 5.11 * n_18) - tangentdiff(o7778) * 1000) / 1000)
f_high8 = h7778 * (1 - (ActivationFunctionTanh(10.1 * n_08 - 30.9 * n_18) - tangentdiff(h7778) * 1000) / 1000)
f_low8 = l7778 * (1 - (ActivationFunctionTanh(4.36 * n_08 - 18.3 * n_18) - tangentdiff(l7778) * 1000) / 1000)
f_close8 = c7778 * (1 - (ActivationFunctionTanh(22.4 * n_08 - 26.6 * n_18) - tangentdiff(c7778) * 1000) / 1000)
//////////////////////////////////
var string vanity_group = "Visual Settings"
magic_wand_toggle = input.bool(true, "Show Active CISD Level (Plot)", group=vanity_group)
drama_filter = input.string("Both", "Triggered CISD Display", options=["Both", "Bullish Only", "Bearish Only", "None"], group=vanity_group)
amnesia_mode = input.bool(false, "Limit Displayed Historical Lines", group=vanity_group)
short_term_memory = input.int(10, "Max Lines to Show", minval=1, group=vanity_group)
yell_at_me = input.bool(true, "Show Labels", group=vanity_group)
girth_units = input.int(4, "Line Width", minval=1, group=vanity_group)
scream_volume = input.string(size.normal, "Label Size", options=[size.tiny, size.small, size.normal, size.large], group=vanity_group)
hipster_font_toggle = input.string("Default", "Font Family", options=["Default", "Monospace"], group=vanity_group)
fashion_choice = input.string("Solid", "Triggered Line Style", options=["Solid", "Dashed", "Dotted"], group=vanity_group)
crayon_box = "Colors"
shrek_mode = input.color(color.new(#2ffb01, 00), "Bullish CISD", group=crayon_box)
blood_bath = input.color(color.new(#ff0000, 00), "Bearish CISD", group=crayon_box)
nerd_stats = "Debug"
paranoia_switch = input.bool(false, "Debug: Show Extreme Tracking", group=nerd_stats)
gossip_column = "HTF Trend Panel"
stalker_mode = input.bool(true, "Show Multi-Timeframe Table", group=gossip_column)
feng_shui = input.string("Bottom Right", "Table Position", options=["Top Right", "Middle Right", "Bottom Right", "Bottom Left"], group=gossip_column)
eye_test = input.string("Small", "Table Size", options=["Tiny", "Small", "Normal", "Large"], group=gossip_column)
// ---------------------------------------------------------
var string fancy_typeface = hipster_font_toggle == "Monospace" ? font.family_monospace : font.family_default
decode_fashion_statement(outfit) =>
switch outfit
"Solid" => line.style_solid
"Dashed" => line.style_dashed
=> line.style_dotted
chosen_style = decode_fashion_statement(fashion_choice)
var int vibes = 0
var float bagholder_entry = na
var int time_machine_setting = na
var float pain_threshold = na
var label sticky_note_of_shame = na
var array<line> graveyard_of_hopes = array.new<line>()
var array<label> choir_of_screams = array.new<label>()
consult_the_crystal_ball(int bias) =>
int temporal_shift = 0
float ancient_price = open
for i = 0 to 500
int candle_attitude = close[i] > open[i] ? 1 : close[i] < open[i] ? -1 : 0
if candle_attitude == 0
continue
bool mood_match = candle_attitude == bias
if not mood_match
break
temporal_shift := i
ancient_price := open[i]
[ancient_price, bar_index - temporal_shift]
archaeologist_jones(int bias) =>
int i = 1
bool artifact_found = false
int dig_site_idx = 0
float artifact_value = na
for j = 1 to 500
i := j
int candle_attitude = close[i] > open[i] ? 1 : close[i] < open[i] ? -1 : 0
if candle_attitude == 0
continue
bool is_correct_era = candle_attitude == bias
if not artifact_found
if is_correct_era
artifact_found := true
dig_site_idx := i
artifact_value := open[i]
else
if not is_correct_era
break
dig_site_idx := i
artifact_value := open[i]
[artifact_value, bar_index - dig_site_idx]
if vibes == 0 and bar_index > 10
int first_impression = close > open ? 1 : close < open ? -1 : 0
if first_impression == 0
for k = 1 to 50
first_impression := close[k] > open[k] ? 1 : close[k] < open[k] ? -1 : 0
if first_impression != 0
break
if first_impression != 0
vibes := first_impression
[origin_price, origin_time] = consult_the_crystal_ball(first_impression)
bagholder_entry := origin_price
time_machine_setting := origin_time
pain_threshold := first_impression == 1 ? high : low
int candle_personality = close > open ? 1 : close < open ? -1 : 0
float fresh_hopium = na
int fresh_timestamp = na
if vibes == 1
if high > pain_threshold
pain_threshold := high
if candle_personality == 1
[p_price, p_idx] = consult_the_crystal_ball(1)
fresh_hopium := p_price
fresh_timestamp := p_idx
else
[p_price, p_idx] = archaeologist_jones(1)
fresh_hopium := p_price
fresh_timestamp := p_idx
bagholder_entry := fresh_hopium
time_machine_setting := fresh_timestamp
else if vibes == -1
if low < pain_threshold
pain_threshold := low
if candle_personality == -1
[p_price, p_idx] = consult_the_crystal_ball(-1)
fresh_hopium := p_price
fresh_timestamp := p_idx
else
[p_price, p_idx] = archaeologist_jones(-1)
fresh_hopium := p_price
fresh_timestamp := p_idx
bagholder_entry := fresh_hopium
time_machine_setting := fresh_timestamp
bool shorts_squeezed = vibes == -1 and close > bagholder_entry
bool longs_rekt = vibes == 1 and close < bagholder_entry
if shorts_squeezed or longs_rekt
bool should_i_paint_it = false
if drama_filter == "Both"
should_i_paint_it := true
else if drama_filter == "Bullish Only"
should_i_paint_it := shorts_squeezed
else if drama_filter == "Bearish Only"
should_i_paint_it := longs_rekt
if should_i_paint_it
color mood_ring = shorts_squeezed ? shrek_mode : blood_bath
//line tragedy_line = line.new(time_machine_setting, bagholder_entry, bar_index, bagholder_entry, color=mood_ring, width=girth_units, style=chosen_style)
//array.push(graveyard_of_hopes, tragedy_line)
label loud_noise = na
//if yell_at_me
//int middle_of_nowhere = math.round((time_machine_setting + bar_index) / 2)
//string gibberish = shorts_squeezed ? "+ALL" : "-SAT"
//color ink_color = shorts_squeezed ? shrek_mode : blood_bath
//loud_noise := label.new(middle_of_nowhere, bagholder_entry, gibberish, style=shorts_squeezed ? label.style_label_down : label.style_label_up, color=color.new(#000000, 100), textcolor=ink_color, size=scream_volume, text_font_family = fancy_typeface)
//array.push(choir_of_screams, loud_noise)
int new_emotional_state = shorts_squeezed ? 1 : -1
vibes := new_emotional_state
[reset_price, reset_time] = consult_the_crystal_ball(new_emotional_state)
bagholder_entry := reset_price
time_machine_setting := reset_time
pain_threshold := new_emotional_state == 1 ? high : low
color active_crayon = vibes == 1 ? shrek_mode : blood_bath
plot(magic_wand_toggle ? bagholder_entry : na, "0", color=active_crayon, linewidth=girth_units, style=plot.style_line)
/////////////////////////////////////////
// --- 1. Dalga Mantığı ---
isClosed = barstate.isconfirmed
spaceUp = (high - close) * 0.65
spaceDown = (open - low) * 0.65
// Ham Koşullar (Senin formülün)
bullRaw12 = isClosed and close[3] < open[3] and close < open and close < low[3]
bearRaw12 = isClosed and close[3] > open[3] and close > open and close > high[3]
// Son 6 bar içinde herhangi bir siyah veya beyaz sinyal var mı?
hasSiyahIn6 = ta.highest(bullRaw12 ? 1 : 0, 6) > 0
hasBeyazIn6 = ta.highest(bearRaw12 ? 1 : 0, 6) > 0
// Karar Yapısı
isZit = hasSiyahIn6 and hasBeyazIn6
isAl = hasBeyazIn6 and not hasSiyahIn6
isSat = hasSiyahIn6 and not hasBeyazIn6
// --- 4. Durum Bildirimleri ---
if isZit and not isZit[1]
label.new(bar_index-3, high + (spaceUp * 4), "", color=color.orange, textcolor=color.white, style=label.style_label_down)
// --- 2. KİLİTLEME MEKANİZMASI (LOCK) ---
var bool lockAL = false
var bool lockSAT = false
if bearRaw12
lockAL := true
lockSAT := false
if bullRaw12
lockSAT := true
lockAL := false
// --- 3. 6 Bar Hafıza ve Karar ---
hasSiyahIn63 = ta.highest(bullRaw12 ? 1 : 0, 6) > 0
hasBeyazIn63 = ta.highest(bearRaw12 ? 1 : 0, 6) > 0
// --- C. 1-0 Mühürleri ---
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, '1', style=label.style_none, textcolor=color.rgb(0, 0, 0), size=size.huge)
label.new(bar_index - 1, high + spaceUp, '0', style=label.style_none, textcolor=color.rgb(249, 3, 3), size=size.huge)
if bearRaw
label.new(bar_index - 1, low[1] - spaceDown, '1', style=label.style_none, textcolor=color.rgb(0, 0, 0), size=size.huge)
label.new(bar_index - 1, low - spaceDown, '0', style=label.style_none, textcolor=color.rgb(249, 3, 3), size=size.huge)
// --- 2. ZAMANIN MİZANI (18:05 ve 09:55) ---
isPrevClose = time(timeframe.period, "1805-1810:1234567")
isTodayOpen = time(timeframe.period, "0955-1000:1234567")
var float anchorYesterday = na
var float anchorToday = na
if isPrevClose
anchorYesterday := f_close8
if isTodayOpen
anchorToday := f_close8
// // Ana Mihenkler
plot(anchorYesterday, "Dün", color=color.new(color.gray, 20), linewidth=2, style=plot.style_linebr)
plot(anchorToday, "Bugün", color=color.new(color.white, 20), linewidth=2, style=plot.style_linebr)
///////////sonnnnnnnnnnnnnnnnnnnnn////////
//@version=6
// ==========================================
// 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ı")
// --- 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)
// ==========================================
// --- B. DL Barlar ---
plotcandle(o100, h100, l100, c100, "5", color=c100 > c100[1] ? color.rgb(243, 244, 237, 100) : color.rgb(248, 4, 4, 100), bordercolor=color.new(#000000, 55))
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(#000000, 55))
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(#000000, 55))
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(#000000, 55))
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))
// ==========================================
// 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.blue)
line.set_width(_fastExtention, 4)
// 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.blue)
//line.set_width(_slowExtention, 4)
// 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, width = 4)
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)
////////////////////
//@version=6
// --- 3. Zaman Fonksiyonu ---
f_offset_time(b) => int(time + (time - nz(time[1])) * b)
// --- 4. Temizlik ve Kayıt ---
var box[] boxes = array.new_box()
var line[] lines = array.new_line()
if barstate.islast
// Güvenli silme nizamı
if array.size(boxes) > 0
for i = 0 to array.size(boxes) - 1
box.delete(array.get(boxes, i))
array.clear(boxes)
if array.size(lines) > 0
for i = 0 to array.size(lines) - 1
line.delete(array.get(lines, i))
array.clear(lines)
// Giriş verileri (Normalize)
in_o = tanh(td(open)), in_h = tanh(td(high)), in_l = tanh(td(low)), in_c = tanh(td(close))
divs = array.from(1000.0, 750.0, 500.0, 250.0, 100.0)
// 5 Hayalet Bar Döngüsü
for i = 0 to 4
d = array.get(divs, i)
float pred_o = 0.0, float pred_h = 0.0, float pred_l = 0.0, float pred_c = 0.0
// DL Hesaplama (Safe Indexing)
for n = 0 to 5
idx = n * 5
pred_o += tanh(in_o * array.get(w_o, idx) + in_h * array.get(w_o, idx+1) + in_l * array.get(w_o, idx+2) + in_c * array.get(w_o, idx+3) + array.get(w_o, idx+4)) * array.get(w_o, 30+n)
pred_h += tanh(in_o * array.get(w_h, idx) + in_h * array.get(w_h, idx+1) + in_l * array.get(w_h, idx+2) + in_c * array.get(w_h, idx+3) + array.get(w_h, idx+4)) * array.get(w_h, 30+n)
pred_l += tanh(in_o * array.get(w_l, idx) + in_h * array.get(w_l, idx+1) + in_l * array.get(w_l, idx+2) + in_c * array.get(w_l, idx+3) + array.get(w_l, idx+4)) * array.get(w_l, 30+n)
pred_c += tanh(in_o * array.get(w_c, idx) + in_h * array.get(w_c, idx+1) + in_l * array.get(w_c, idx+2) + in_c * array.get(w_c, idx+3) + array.get(w_c, idx+4)) * array.get(w_c, 30+n)
// De-normalize Fiyat Tahminleri
vo = open * (1 - (tanh(pred_o + array.get(w_o, 36)) - td(open) * d) / d)
vh = high * (1 - (tanh(pred_h + array.get(w_h, 36)) - td(high) * d) / d)
vl = low * (1 - (tanh(pred_l + array.get(w_l, 36)) - td(low) * d) / d)
vc = close * (1 - (tanh(pred_c + array.get(w_c, 36)) - td(close) * d) / d)
// --- Görselleştirme ---
t1 = f_offset_time(i + 1)
t2 = f_offset_time(i + 2)
transp = 30 + (i * 12)
b_col = vc >= vo ? color.new(color.rgb(0, 230, 119, 100), transp) : color.new(color.rgb(255, 82, 82, 100), transp)
// Kutular ve İğneler
array.push(boxes, box.new(t1, math.max(vo, vc), t2, math.min(vo, vc), border_color=color.new(color.gray, 60), bgcolor=b_col, xloc=xloc.bar_time))
array.push(lines, line.new(f_offset_time(i + 1.5), vh, f_offset_time(i + 1.5), vl, color=color.new(color.gray, 50), xloc=xloc.bar_time))
// --- Momentum Entegrasyonu ---
sp = 1 // Hassasiyet
dt = time - time[1]
for m = 1 to 3
dx = m * 5 * sp
dy = close - close[dx]
array.push(lines, line.new(time, close, time + dx * dt, close + dy, xloc=xloc.bar_time, color=color.new(color.black, 00), style=line.style_dashed))
//plot(close, color=color.new(color.white, 100))
/////
fibo-sentinel olasılık....
PHP Code:
//@version=5
indicator("Ai", overlay=true, max_bars_back=1000, max_lines_count=500, max_boxes_count=500)
// --- 1. DERİN ÖĞRENME (ANN) HESAPLAMALARI ---
tangentdiff(_src) => nz((_src - _src[1]) / _src[1])
ActivationFunctionTanh(v1) => (1 - math.exp(-2 * v1)) / (1 + math.exp(-2 * v1))
_ind1 = (open - open[1]) / open[1], _ind2 = (high - high[1]) / high[1]
n_0 = ActivationFunctionTanh(_ind1), n_1 = ActivationFunctionTanh(_ind2)
f_open = open * (1 - (ActivationFunctionTanh(0.03 * n_0 + 5.11 * n_1) - tangentdiff(open) * 1000) / 1000)
f_high = high * (1 - (ActivationFunctionTanh(10.1 * n_0 - 30.9 * n_1) - tangentdiff(high) * 1000) / 1000)
f_low = low * (1 - (ActivationFunctionTanh(4.36 * n_0 - 18.3 * n_1) - tangentdiff(low) * 1000) / 1000)
f_close = close * (1 - (ActivationFunctionTanh(22.4 * n_0 - 26.6 * n_1) - tangentdiff(close) * 1000) / 1000)
// --- 2. KADEMELİ ZIRH VE SENTINEL HESABI ---
f_get_kalkan(_len) =>
_stdev = ta.stdev(f_close, _len)
_basis = ta.sma(f_close, _len)
[_basis + (_stdev * 2.5), _basis - (_stdev * 2.5), _basis]
[up100, dn100, b100] = f_get_kalkan(100)
[up250, dn250, b250] = f_get_kalkan(250)
[up500, dn500, b500] = f_get_kalkan(500)
[up750, dn750, b750] = f_get_kalkan(750)
[up1000, dn1000, b1000] = f_get_kalkan(1000)
// --- 3. TLM VEKTÖR HESABI (GÖRÜNMEZ ANALİZ) ---
ph = ta.pivothigh(f_high, 15, 15), pl = ta.pivotlow(f_low, 15, 15)
var float vector_direction = 0.0
if not na(ph)
vector_direction := 1.0 // Ayı baskısı / Direnç
if not na(pl)
vector_direction := -1.0 // Boğa baskısı / Destek
// --- 4. GÖRSELLEŞTİRME (ÇİZGİSİZ) ---
plotcandle(f_open, f_high, f_low, f_close, title="1", color=f_close > f_open ? color.new(#00ffbb, 75) : color.new(#ff0055, 75), bordercolor=na)
plotcandle(up100, up100, dn100, dn100, title="6", color=f_close > b100 ? color.new(#faf9f8, 90) : color.new(#080808, 90), bordercolor=na)
// --- 5. MONTE CARLO VE MARKOV REJİM ---
returns = math.log(f_close / f_close[1])
mu = ta.sma(returns, 50), sigma = ta.stdev(returns, 50)
mc_upper = f_close * math.exp(mu + sigma * 2.326), mc_lower = f_close * math.exp(mu - sigma * 2.326)
markov_state = f_close > b500 ? (f_close > up100 ? "AŞIRI BOĞA" : "BOĞA") : (f_close < dn100 ? "AŞIRI AYI" : "AYI")
markov_col = f_close > b500 ? color.green : color.red
// --- 6. ULTIMATE DASHBOARD (TÜM VERİ BURADA) ---
var table stats_table = table.new(position.top_right, 2, 11, border_width = 1, frame_color=color.gray)
f_near_color(_val) => math.abs(close - _val) / _val < 0.003 ? color.new(color.yellow, 30) : color.new(color.white, 50)
if barstate.islast
table.cell(stats_table, 0, 0, "SİSTEM DURUMU", bgcolor=color.black, text_color=color.white)
table.cell(stats_table, 1, 0, "VERİ / ANALİZ", bgcolor=color.black, text_color=color.white)
table.cell(stats_table, 0, 1, "MARKOV ", bgcolor=color.new(markov_col, 80))
table.cell(stats_table, 1, 1, markov_state, bgcolor=markov_col, text_color=color.white)
table.cell(stats_table, 0, 2, "TLM ", bgcolor=color.new(color.white, 80))
table.cell(stats_table, 1, 2, vector_direction > 0 ? "DİRENÇ BASKISI" : "DESTEK GÜCÜ", bgcolor=vector_direction > 0 ? color.new(color.red, 70) : color.new(color.green, 70), text_color=color.white)
table.cell(stats_table, 0, 3, "MONTE CARLO ", bgcolor=color.new(color.blue, 70), text_color=color.white)
table.cell(stats_table, 1, 3, str.format("{0,number,#.#}-{1,number,#.#}", mc_upper, mc_lower))
table.cell(stats_table, 0, 4, "100'LÜ SENTINEL", bgcolor=f_near_color(up100))
table.cell(stats_table, 1, 4, str.format("{0,number,#.#} / {1,number,#.#}", up100, dn100))
table.cell(stats_table, 0, 5, "250'Lİ SENTINEL", bgcolor=f_near_color(up250))
table.cell(stats_table, 1, 5, str.format("{0,number,#.#} / {1,number,#.#}", up250, dn250))
table.cell(stats_table, 0, 6, "500'LÜ SENTINEL", bgcolor=f_near_color(up500))
table.cell(stats_table, 1, 6, str.format("{0,number,#.#} / {1,number,#.#}", up500, dn500))
table.cell(stats_table, 0, 7, "750'Lİ SENTINEL", bgcolor=f_near_color(up750))
table.cell(stats_table, 1, 7, str.format("{0,number,#.#} / {1,number,#.#}", up750, dn750))
table.cell(stats_table, 0, 8, "1000'Lİ SENTINEL", bgcolor=color.purple, text_color=color.white)
table.cell(stats_table, 1, 8, str.format("{0,number,#.#} / {1,number,#.#}", up1000, dn1000))
// --- 7. QUANTUM-ZONE KUTULARI (ÇİZGİSİZ BÖLGELER) ---
if not na(ph)
box.new(bar_index - 15, ph, bar_index + 5, ph * 0.998, border_color=na, bgcolor=color.new(color.red, 35))
if not na(pl)
box.new(bar_index - 15, pl, bar_index + 5, pl * 1.002, border_color=na, bgcolor=color.new(color.green, 35))
/////// /////////////////
//@version=6
// ==================== GİRDİLER ====================
tlm_lookback = input.int(15, "TLM Pivot Hassasiyeti")
mc_period = input.int(50, "Monte Carlo Olasılık Periyodu")
radius_mult = input.int(25, "Hilal Menzili")
col_high = input.color(color.new(#000000, 20), "Direnç Kalkanı")
col_low = input.color(color.new(#ffffff, 20), "Destek Kalkanı")
// ==================== TLM FİLTRE MOTORU (Saf Fiyat) ====================
// Sadece güçlü, "noksansız" pivot noktalarını seçer
ph33 = ta.pivothigh(tlm_lookback, tlm_lookback)
pl33 = ta.pivotlow(tlm_lookback, tlm_lookback)
// Filtre: Her pivotu değil, sadece yeni bir kanal sınırı oluşturanı kabul et
new_h = not na(ph33)
new_l = not na(pl33)
// ==================== MONTE CARLO & VOLATİLİTE ====================
returns33= math.log(close / close[1])
sigma33 = ta.stdev(returns33, mc_period)
expected_vol33 = sigma33 * math.sqrt(radius_mult) * 1.96
// ==================== PRICE ACTION KANAL MANTIĞI ====================
var float pa_upper = na
var float pa_lower = na
if new_h
pa_upper := high[tlm_lookback]
if new_l
pa_lower := low[tlm_lookback]
// ==================== ELİTE HİLAL ÇİZİMİ (TLM ONAYLI) ====================
ease_out(t) => t * (2 - t)
// Üst Hilal (TLM Filtresinden Geçmiş Güçlü Direnç)
var polyline hi_c = na
if new_h
pts = array.new<chart.point>()
for i = 0 to 20
float t = i / 20.0
float angle = math.pi + (ease_out(t) * math.pi)
int x = int(math.round(math.cos(angle) * radius_mult)) + bar_index + radius_mult
float y = math.sin(angle) * (expected_vol33 * close) + pa_upper
pts.push(chart.point.from_index(x, y))
polyline.delete(hi_c)
hi_c := polyline.new(pts, curved=true, line_color=col_high, line_width=2)
// Alt Hilal (TLM Filtresinden Geçmiş Güçlü Destek)
var polyline lo_c = na
if new_l
pts = array.new<chart.point>()
for i = 0 to 20
float t = i / 20.0
float angle = (ease_out(t) * math.pi)
int x = int(math.round(math.cos(angle) * radius_mult)) + bar_index + radius_mult
float y = math.sin(angle) * (expected_vol33 * close) + pa_lower
pts.push(chart.point.from_index(x, y))
polyline.delete(lo_c)
lo_c := polyline.new(pts, curved=true, line_color=col_low, line_width=2)
// ==================== GÖRSELLEŞTİRME ====================
plot(pa_upper, "TLM Üst", color.new(col_high, 80), 2, plot.style_linebr, offset=-tlm_lookback)
plot(pa_lower, "TLM Alt", color.new(col_low, 80), 2, plot.style_linebr, offset=-tlm_lookback)
////////////////////
//@version=6
// --- GİRDİLER ---
radius_mult555 = input.int(5, "Daire Büyüklüğü")
pivot_len555 = input.int(2, "Pivot Hassasiyeti")
//col_high = input.color(color.new(color.red, 60), "Üst Daire Rengi")
//col_low = input.color(color.new(color.lime, 60), "Alt Daire Rengi")
// --- HESAPLAMALAR ---
ph55 = ta.pivothigh(pivot_len555, pivot_len555)
pl55 = ta.pivotlow(pivot_len555, pivot_len555)
atr = ta.atr(14)
// --- ÜST DAİRE MOTORU (Pivot High) ---
var int hi_index = na
var float hi_price = na
var polyline hi_circle = na
if not na(ph55)
hi_index := bar_index[pivot_len555]
hi_price := high[pivot_len555]
hi_points = array.new<chart.point>()
for i = 0 to 40
float angle = (i * 2 * math.pi) / 40
int x = int(math.round(math.cos(angle) * radius_mult555)) + hi_index
float y = math.sin(angle) * radius_mult555 * (atr * 0.5) + hi_price
hi_points.push(chart.point.from_index(x, y))
if not na(hi_circle)
polyline.delete(hi_circle)
hi_circle := polyline.new(hi_points, curved=true, line_color=col_high, fill_color=color.new(col_high, 93), line_width=2)
// --- ALT DAİRE MOTORU (Pivot Low) ---
var int lo_index = na
var float lo_price = na
var polyline lo_circle = na
if not na(pl55)
lo_index := bar_index[pivot_len555]
lo_price := low[pivot_len555]
lo_points = array.new<chart.point>()
for i = 0 to 40
float angle = (i * 2 * math.pi) / 40
int x = int(math.round(math.cos(angle) * radius_mult555)) + lo_index
float y = math.sin(angle) * radius_mult555 * (atr * 0.5) + lo_price
lo_points.push(chart.point.from_index(x, y))
if not na(lo_circle)
polyline.delete(lo_circle)
lo_circle := polyline.new(lo_points, curved=true, line_color=col_low, fill_color=color.new(col_low, 93), line_width=2)
// --- MERKEZ İŞARETLERİ ---
//plot(hi_price, "FiboÜst", color.rgb(255, 82, 82, 100), 2, plot.style_cross, offset=-pivot_len555, ****=false)
//plot(lo_price, "FiboAlt", color.rgb(0, 230, 119, 100), 2, plot.style_cross, offset=-pivot_len555, ****=false)
/////////////////////////
Yer İmleri