PHP Code:
//@version=6
indicator("Crescent Markov-Fusion Elite"overlay true)

// ==================== GÝRDÝLER ====================
tlm_lookback input.int(20"TLM Hassasiyeti")
mc_period    input.int(50"Monte Carlo/Markov Periyodu")
radius_mult  input.int(25"Hilal Menzili")
col_high     input.color(color.new(#ff0055, 20), "Direnç Kalkaný")
col_low      input.color(color.new(#00ffbb, 20), "Destek Kalkaný")

// ==================== MARKOV REJÝM ANALÝZÝ (BASÝTLEÞTÝRÝLMÝÞ) ====================
// Fiyatýn ardýþýk mumlardaki deðiþimine göre "Durum Geçiþ" olasýlýðý hesaplar
up_move   close close[1] ? 0
down_move 
close close[1] ? 0

// Boða ve Ayý durumlarýnýn son periyottaki yoðunluðu (Geçiþ Olasýlýðý)
bull_prob ta.sma(up_movemc_period)
bear_prob ta.sma(down_movemc_period)
market_regime bull_prob 0.55 "Bull" bear_prob 0.55 "Bear" "Neutral"

// ==================== TLM & MONTE CARLO MOTORU ====================
ph ta.pivothigh(tlm_lookbacktlm_lookback)
pl ta.pivotlow(tlm_lookbacktlm_lookback)

returns math.log(close close[1])
sigma   ta.stdev(returnsmc_period)
expected_vol sigma math.sqrt(radius_mult) * 1.96

// ==================== MARKOV ONAYLI HÝLAL ÇÝZÝMÝ ====================
ease_out(t) => * (t)

// Üst Hilal (Markov "Bear" veya "Neutral" iken daha güçlü)
var polyline hi_c na
if not na(ph) and (market_regime == "Bear" or market_regime == "Neutral")
    
pts = array.new<chart.point>()
    for 
0 to 20
        float t 
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_vol close) + high[tlm_lookback]
        
pts.push(chart.point.from_index(xy))
    
    
polyline.delete(hi_c)
    
hi_c := polyline.new(ptscurved=trueline_color=col_highline_width=4)

// Alt Hilal (Markov "Bull" veya "Neutral" iken daha güçlü)
var polyline lo_c na
if not na(pl) and (market_regime == "Bull" or market_regime == "Neutral")
    
pts = array.new<chart.point>()
    for 
0 to 20
        float t 
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_vol close) + low[tlm_lookback]
        
pts.push(chart.point.from_index(xy))
    
    
polyline.delete(lo_c)
    
lo_c := polyline.new(ptscurved=trueline_color=col_lowline_width=4)

// ==================== GÖRSELLEÞTÝRME & PANEL ====================
var table board table.new(position.top_right22bgcolor=color.new(color.black80), border_width=1)
if 
barstate.islast
    regime_col 
market_regime == "Bull" color.lime market_regime == "Bear" color.red color.gray
    table
.cell(board00"Piyasa Rejimi:"text_color=color.white)
    
table.cell(board10market_regimetext_color=regime_col)
    
table.cell(board01"Boða Olasýlýðý:"text_color=color.white)
    
table.cell(board11"%" str.tostring(bull_prob 100"##.#"), text_color=color.lime