PHP Code://@version=5
indicator("Crescent 4D Quantum-Zone v9.3.1 Data-Only", overlay=true, max_bars_back=1000, max_lines_count=500, max_boxes_count=500)
// --- PARAMETRELER ---
tlm_length = input.int(15, "TLM Hassasiyeti")
show_deep = input.bool(true, "Hayalet Mumları Göster")
// --- 1. DERİN ÖĞRENME HESAPLAMALARI (ANN) ---
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)
// Değişken tanımlamaları düzeltildi
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)
// Hayalet Mumlar
plotcandle(show_deep ? f_open : na, f_high, f_low, f_close, title="Neural Ghost Bars", color=f_close > f_open ? color.new(#00ffbb, 85) : color.new(#ff0055, 85), bordercolor=na)
// --- 2. OLASILIK KALKAN HESAPLARI ---
f_get_kalkan(_len) =>
_stdev = ta.stdev(f_close, _len)
_basis = ta.sma(f_close, _len)
[_basis + (_stdev * 2.0), _basis - (_stdev * 2.0)]
[up100, dn100] = f_get_kalkan(100)
[up250, dn250] = f_get_kalkan(250)
[up500, dn500] = f_get_kalkan(500)
[up750, dn750] = f_get_kalkan(750)
[up1000, dn1000] = f_get_kalkan(1000)
// --- 3. MARKOV REJİM VE VERİ TABLOSU ---
int state = close > ta.sma(close, 50) ? 1 : close < ta.sma(close, 50) ? -1 : 0
string rejim_str = state == 1 ? "BULL (POZİTİF)" : state == -1 ? "BEAR (NEGATİF)" : "NEUTRAL"
color rejim_col = state == 1 ? color.green : state == -1 ? color.red : color.gray
var table stats_table = table.new(position.top_right, 2, 7, border_width = 1, frame_color=color.gray)
if barstate.islast
table.cell(stats_table, 0, 0, "OLASILIK KATMANI", bgcolor=color.black, text_color=color.white)
table.cell(stats_table, 1, 0, "DEĞER (ÜST / ALT)", bgcolor=color.black, text_color=color.white)
table.cell(stats_table, 0, 1, "MARKOV REJİMİ", bgcolor=color.new(color.gray, 70))
table.cell(stats_table, 1, 1, rejim_str, bgcolor=rejim_col, text_color=color.white)
table.cell(stats_table, 0, 2, "100'LÜ ZIRH", bgcolor=color.new(color.gray, 90))
table.cell(stats_table, 1, 2, str.format("{0,number,#.#} / {1,number,#.#}", up100, dn100))
table.cell(stats_table, 0, 3, "250'Lİ ZIRH", bgcolor=color.new(color.gray, 90))
table.cell(stats_table, 1, 3, str.format("{0,number,#.#} / {1,number,#.#}", up250, dn250))
table.cell(stats_table, 0, 4, "500'LÜ ZIRH", bgcolor=color.new(color.gray, 90))
table.cell(stats_table, 1, 4, str.format("{0,number,#.#} / {1,number,#.#}", up500, dn500))
table.cell(stats_table, 0, 5, "750'Lİ ZIRH", bgcolor=color.new(color.gray, 90))
table.cell(stats_table, 1, 5, str.format("{0,number,#.#} / {1,number,#.#}", up750, dn750))
table.cell(stats_table, 0, 6, "1000'Lİ KUANTUM", bgcolor=color.new(color.purple, 80), text_color=color.white)
table.cell(stats_table, 1, 6, str.format("{0,number,#.#} / {1,number,#.#}", up1000, dn1000))
// --- 4. QUANTUM-ZONE ---
float ph = ta.pivothigh(f_high, tlm_length, tlm_length)
float pl = ta.pivotlow(f_low, tlm_length, tlm_length)
if not na(ph)
box.new(bar_index - tlm_length, ph, bar_index + 10, ph * 0.998, border_color=color.new(color.red, 70), bgcolor=color.new(color.red, 95))
if not na(pl)
box.new(bar_index - tlm_length, pl, bar_index + 10, pl * 1.002, border_color=color.new(color.green, 70), bgcolor=color.new(color.green, 95))




Alıntı yaparak yanıtla
Yer İmleri