https://tr.tradingview.com/script/Ur...e-pair-viewer/
kripto iηin.. aynύ meta.. farklύ borsa...
https://tr.tradingview.com/script/Ur...e-pair-viewer/
kripto iηin.. aynύ meta.. farklύ borsa...
16.07.2024 - 10.12.2024
https://tr.tradingview.com/script/LegVTXTJ/
onsa gφre s1 deπeri...iηin
16.07.2024 - 10.12.2024
16.07.2024 - 10.12.2024
basit bir kalύp φrneπi...
PHP Code:// © Kinetik Komuta Merkezi - έstatistiksel Arbitraj (Emir Paneli)
//@version=6
indicator("Arbitraj Komuta Paneli [Karargah]", overlay=true)
// ═════════════════════════════════════════════════════════════════════════
// 1. GέRDέLER VE CEPHANE SEΗέMέ
// ═════════════════════════════════════════════════════════════════════════
grp_sym = "Hedef Hisseler"
sym1 = input.symbol("BIST:MCARD", "1. Hisse", group=grp_sym)
sym2 = input.symbol("BIST:NETCD", "2. Hisse", group=grp_sym)
len = input.int(20, "Z-Score Periyodu", minval=2, group=grp_sym)
tetik_siniri = input.float(2.0, "Tetikleme Sύnύrύ (+/-)", step=0.1, group=grp_sym)
grp_time = "Zaman Kalkanύ (Veri Zehirlenmesini Φnleme)"
hide_weekend = input.bool(true, "Hafta Sonu Verisini Sil", group=grp_time)
hide_session = input.session("1810-0950", "Gizlenecek Φlό Saatler (BIST Dύώύ)", group=grp_time)
tz = input.string("UTC+3", "Saat Dilimi", group=grp_time)
// ═════════════════════════════════════════════════════════════════════════
// 2. έSTέHBARAT AΠI (Ηift Yφnlό Veri Ηekimi)
// ═════════════════════════════════════════════════════════════════════════
c1 = request.security(sym1, timeframe.period, close, gaps=barmerge.gaps_on)
c2 = request.security(sym2, timeframe.period, close, gaps=barmerge.gaps_on)
// ═════════════════════════════════════════════════════════════════════════
// 3. ZAMAN KALKANI ήALTERέ
// ═════════════════════════════════════════════════════════════════════════
is_weekend = hide_weekend and (dayofweek == dayofweek.saturday or dayofweek == dayofweek.sunday)
in_hide_session = not na(time(timeframe.period, hide_session, tz))
should_hide = is_weekend or in_hide_session
// ═════════════════════════════════════════════════════════════════════════
// 4. Z-SCORE MATEMATέΠέ (ARKA PLAN)
// ═════════════════════════════════════════════════════════════════════════
float spread = (c1 != 0 and c2 != 0) ? (c1 / c2) : na
var float clean_spread = na
if not should_hide and not na(spread)
clean_spread := spread
float sma_spread = ta.sma(clean_spread, len)
float std_spread = ta.stdev(clean_spread, len)
float z_score = std_spread == 0 ? 0 : (clean_spread - sma_spread) / std_spread
// ═════════════════════════════════════════════════════════════════════════
// 5. KOMUTA TABLOSU (HUD EKRANI)
// ═════════════════════════════════════════════════════════════════════════
if barstate.islast
// Ekranda gόzel gφrόnmesi iηin "BIST:" yazύsύnύ kesip atύyoruz
string isim1 = str.replace_all(sym1, "BIST:", "")
string isim2 = str.replace_all(sym2, "BIST:", "")
// Durum Analizi
bool asiri_pahali = z_score >= tetik_siniri
bool asiri_ucuz = z_score <= -tetik_siniri
// Emir Metinleri
string emir1 = asiri_pahali ? "SAT (SHORT)" : asiri_ucuz ? "AL (LONG)" : "BEKLE"
string emir2 = asiri_pahali ? "AL (LONG)" : asiri_ucuz ? "SAT (SHORT)" : "BEKLE"
string durum = asiri_pahali ? "MAKAS AΗILDI (+)" : asiri_ucuz ? "MAKAS ΗΦKTά (-)" : "DENGE (PUSUDA)"
// Renkler
color c_emir1 = asiri_pahali ? color.red : asiri_ucuz ? color.lime : color.gray
color c_emir2 = asiri_pahali ? color.lime : asiri_ucuz ? color.red : color.gray
color c_durum = asiri_pahali or asiri_ucuz ? color.yellow : color.gray
// Tabloyu Ηiz
var table hud = table.new(position.top_right, 2, 4, bgcolor=color.new(#0D0D0D, 10), border_color=color.new(color.gray, 70), border_width=1)
// Baώlύk
table.cell(hud, 0, 0, "⚔️ ARBέTRAJ KOMUTA ⚔️", text_color=color.white, text_size=size.normal, bgcolor=color.new(#111111, 0), text_halign=text.align_center)
table.merge_cells(hud, 0, 0, 1, 0)
// Makas Durumu
table.cell(hud, 0, 1, "Piyasa Durumu", text_color=color.silver, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 1, durum, text_color=c_durum, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
// 1. Hisse Emri (Hata Giderildi: text_style parametresi kaldύrύldύ)
table.cell(hud, 0, 2, isim1, text_color=color.white, text_size=size.normal, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 2, emir1, text_color=c_emir1, text_size=size.normal, bgcolor=color.new(#161616, 0))
// 2. Hisse Emri (Hata Giderildi: text_style parametresi kaldύrύldύ)
table.cell(hud, 0, 3, isim2, text_color=color.white, text_size=size.normal, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 3, emir2, text_color=c_emir2, text_size=size.normal, bgcolor=color.new(#161616, 0))
16.07.2024 - 10.12.2024
farklύ bir kalύp φrneπi.... arbitrajla ilgili....
PHP Code:// © Kinetik Komuta Merkezi - V9.0 KUANTUM ARBέTRAJ MATRIX (AGPro Fusion)
//@version=6
strategy("V9.0 Kuantum Arbitraj Matrix", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.04)
// ═════════════════════════════════════════════════════════════════════════
// 1. GέRDέLER VE ARBέTRAJ CEPHANESέ
// ═════════════════════════════════════════════════════════════════════════
grp_sym = "Hedef Hisseler (Bacaklar)"
sym1 = input.symbol("BIST:MCARD", "1. Hisse (Ana Grafikteki)", group=grp_sym)
sym2 = input.symbol("BIST:NETCD", "2. Hisse (Kύyaslanan)", group=grp_sym)
grp_logic = "AGPro Motor Ayarlarύ"
zLength = input.int(180, "Z-Score Hafύzasύ (Lookback)", minval=60, maxval=500, group=grp_logic)
entryZ = input.float(1.70, "Taarruz Sύnύrύ (Entry Z)", step=0.1, group=grp_logic)
exitZ = input.float(0.70, "Tahliye Sύnύrύ (Reversion Z)", step=0.1, group=grp_logic)
minIntegrity = input.float(58.0, "Minimum Gόvenlik Puanύ (Integrity)", minval=0.0, maxval=100.0, group=grp_logic)
// BIST iηin φlό saatleri sόzme
hide_session = input.session("1810-0950", "Gizlenecek Φlό Saatler", group="Zaman Kalkanύ")
tz = input.string("UTC+3", "Saat Dilimi", group="Zaman Kalkanύ")
in_hide_session = not na(time(timeframe.period, hide_session, tz))
is_weekend = (dayofweek == dayofweek.saturday or dayofweek == dayofweek.sunday)
should_hide = is_weekend or in_hide_session
// ═════════════════════════════════════════════════════════════════════════
// 2. VERέ έSTέHBARATI VE TEMέZLEME
// ═════════════════════════════════════════════════════════════════════════
c1_raw = request.security(sym1, timeframe.period, close, gaps=barmerge.gaps_on)
c2_raw = request.security(sym2, timeframe.period, close, gaps=barmerge.gaps_on)
// Φlό saatleri filtrele (Veri zehirlenmesini φnle)
var float c1 = na
var float c2 = na
if not should_hide and c1_raw > 0 and c2_raw > 0
c1 := c1_raw
c2 := c2_raw
// ═════════════════════════════════════════════════════════════════════════
// 3. LOG-RASYO VE Z-SCORE ΗEKέRDEΠέ (AGPro)
// ═════════════════════════════════════════════════════════════════════════
float ratio = (not na(c1) and not na(c2)) ? (c1 / c2) : na
float logRatio = not na(ratio) ? math.log(ratio) : na
float ratioMean = ta.sma(logRatio, zLength)
float ratioDev = ta.stdev(logRatio, zLength)
float zScore = ratioDev > 0 ? (logRatio - ratioMean) / ratioDev : na
float absZ = math.abs(zScore)
// ═════════════════════════════════════════════════════════════════════════
// 4. INTEGRITY (GάVENLέK) VE QUALITY (KALέTE) HESAPLARI
// ═════════════════════════════════════════════════════════════════════════
// 4a. Korelasyon (Kardeώlik bozuldu mu?)
float retA = (not na(c1) and not na(c1[1])) ? math.log(c1 / nz(c1[1], c1)) : na
float retB = (not na(c2) and not na(c2[1])) ? math.log(c2 / nz(c2[1], c2)) : na
float pairCorr = ta.correlation(retA, retB, 60)
// 4b. Volatilite Geniώlemesi (Makas ηύldύrdύ mύ?)
int shortLen = 20
float volShort = ta.stdev(logRatio, shortLen)
float volBase = ta.stdev(logRatio, 60)
float volExpansion = volBase > 0 ? volShort / volBase : na
// 4c. Ortalama Kaymasύ (Drift)
float meanDrift = (ratioDev > 0 and not na(ratioMean[20])) ? math.abs(ratioMean - ratioMean[20]) / ratioDev : na
// Normaller ve Skorlama (0 ile 1 arasύ sύkύώtύrma)
float corrNorm = na(pairCorr) ? 0.0 : math.max(0, math.min(1, (pairCorr + 1.0) / 2.0))
float driftNorm = na(meanDrift) ? 0.0 : math.max(0, math.min(1, 1.0 - meanDrift / 0.45))
float volNorm = na(volExpansion) ? 0.0 : math.max(0, math.min(1, 1.0 - math.max(0, volExpansion - 1.0) / 0.45))
float integrityScore = math.max(0, math.min(100, 100.0 * (0.45 * corrNorm + 0.30 * driftNorm + 0.25 * volNorm)))
bool integrityOk = integrityScore >= minIntegrity
float qualityScore = math.max(0, math.min(100, (nz(absZ) / 2.40) * 42.0 + integrityScore * 0.48))
// ═════════════════════════════════════════════════════════════════════════
// 5. STRATEJέ FάZYONU (SAVAή ALANI)
// ═════════════════════════════════════════════════════════════════════════
// Z-Score eksi ise: 1. Hisse (MCARD) ucuzlamύώtύr -> LONG
bool t_long_giris = (zScore <= -entryZ) and integrityOk and barstate.isconfirmed
// Z-Score artύ ise: 1. Hisse (MCARD) pahalanmύώtύr -> SHORT
bool t_short_giris = (zScore >= entryZ) and integrityOk and barstate.isconfirmed
// Taarruz!
if t_long_giris
strategy.entry("LONG", strategy.long)
if t_short_giris
strategy.entry("SHORT", strategy.short)
// Tahliye (Reversion) - Makas dengeye gelince ηύk!
if strategy.position_size > 0 and zScore >= -exitZ and barstate.isconfirmed
strategy.close("LONG", comment="Makas Kapandύ (Denge)")
if strategy.position_size < 0 and zScore <= exitZ and barstate.isconfirmed
strategy.close("SHORT", comment="Makas Kapandύ (Denge)")
// Acil Durum Tahliyesi (Gόvenlik έhlali - Kardeώlik Bozulursa)
if not integrityOk and absZ >= entryZ and strategy.position_size != 0 and barstate.isconfirmed
strategy.close_all(comment="INTEGRITY BLOCK! Acil Tahliye")
// ═════════════════════════════════════════════════════════════════════════
// 6. GΦRSELLEήTέRME VE HUD PANEL
// ═════════════════════════════════════════════════════════════════════════
// Operasyon Bar Renklendirmeleri (Aqua=Long, Fuchsia=Short, Gray=Pusu)
color position_bar_col = strategy.position_size > 0 ? color.new(color.aqua, 0) : strategy.position_size < 0 ? color.new(color.fuchsia, 0) : color.new(color.gray, 50)
barcolor(position_bar_col, title="Operasyon Bar Rengi")
plotshape(t_long_giris and strategy.position_size <= 0, "AL", shape.triangleup, location.belowbar, color.aqua, size=size.small)
plotshape(t_short_giris and strategy.position_size >= 0, "SAT", shape.triangledown, location.abovebar, color.red, size=size.small)
// Kβr Faktφrό ve HUD Panel Hesaplamalarύ
float br_kar = strategy.grossprofit
float br_zarar = strategy.grossloss
float kar_faktoru = br_zarar == 0 ? (br_kar > 0 ? 99.99 : 0.0) : (br_kar / br_zarar)
if barstate.islast
string isim1 = str.replace_all(sym1, "BIST:", "")
string isim2 = str.replace_all(sym2, "BIST:", "")
// Panel Renkleri (AGPro temasύ uyumlu)
color c_bull = color.rgb(34, 197, 166) // Yeώil
color c_bear = color.rgb(244, 114, 182) // Pembe
color c_neut = color.rgb(245, 189, 92) // Sarύ
var table hud = table.new(position.top_right, 2, 6, bgcolor=color.new(#0D0D0D, 15), border_color=color.new(color.gray, 70), border_width=1)
// Baώlύk
table.cell(hud, 0, 0, "⚔️ V9.0 ARBέTRAJ MATRIX ⚔️", text_color=color.white, text_size=size.normal, bgcolor=color.new(color.blue, 60), text_halign=text.align_center)
table.merge_cells(hud, 0, 0, 1, 0)
// Kβr Faktφrό
color pf_color = kar_faktoru >= 1.2 ? c_bull : c_bear
table.cell(hud, 0, 1, "Kβr Faktφrό", text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 1, str.tostring(kar_faktoru, "#.##"), text_color=pf_color, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
// Z-Score Durumu
table.cell(hud, 0, 2, "Z-Score (Makas)", text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 2, str.tostring(zScore, "#.##"), text_color=absZ >= entryZ ? c_bear : c_bull, text_size=size.small, bgcolor=color.new(#161616, 0))
// Gόvenlik Duvarύ (Integrity)
table.cell(hud, 0, 3, "Gόvenlik Puanύ", text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 3, str.tostring(integrityScore, "#") + "/100", text_color=integrityOk ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
// Operasyon Yφnό (Ana Grafikteki Hisse έηin)
table.cell(hud, 0, 4, isim1 + " Emri", text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 4, strategy.position_size > 0 ? "LONG (ALIM)" : strategy.position_size < 0 ? "SHORT (SATIM)" : "BEKLE", text_color=strategy.position_size > 0 ? c_bull : strategy.position_size < 0 ? c_bear : color.gray, text_size=size.small, bgcolor=color.new(#161616, 0))
// Tahliye Bilgisi
string next_step = strategy.position_size != 0 ? "Tahliye iηin Z: " + str.tostring(strategy.position_size > 0 ? -exitZ : exitZ, "#.##") : "Tetik Z: " + str.tostring(entryZ, "#.##")
table.cell(hud, 0, 5, "Sonraki Hamle", text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 5, next_step, text_color=c_neut, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
16.07.2024 - 10.12.2024
farklύ bir deneme....
PHP Code:// © Kinetik Komuta Merkezi - V9.1 KITALARARASI ARBέTRAJ MATRIX (ADR & FX Entegreli)
//@version=6
strategy("V9.1 Kύtalararasύ Arbitraj (TCELL/TKC)", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.04)
// ═════════════════════════════════════════════════════════════════════════
// 1. GέRDέLER VE KITALARARASI CEPHANE (ADR)
// ═════════════════════════════════════════════════════════════════════════
grp_sym = "Kύtalararasύ Hedefler"
sym_local = input.symbol("BIST:TCELL", "Yerel Hisse (BIST)", group=grp_sym)
sym_adr = input.symbol("NYSE:TKC", "Yabancύ ADR (NYSE)", group=grp_sym)
sym_fx = input.symbol("FX_IDC:USDTRY", "Gφlge Dφviz Kuru", group=grp_sym)
adr_ratio = input.float(2.5, "ADR Ηarpanύ (1 TKC = X TCELL)", step=0.5, group=grp_sym)
grp_logic = "AGPro Motor Ayarlarύ"
zLength = input.int(180, "Z-Score Hafύzasύ (Lookback)", minval=60, maxval=500, group=grp_logic)
entryZ = input.float(1.70, "Taarruz Sύnύrύ (Entry Z)", step=0.1, group=grp_logic)
exitZ = input.float(0.70, "Tahliye Sύnύrύ (Reversion Z)", step=0.1, group=grp_logic)
minIntegrity = input.float(58.0, "Minimum Gόvenlik Puanύ (Integrity)", minval=0.0, maxval=100.0, group=grp_logic)
// BIST ve NYSE Kesiώim Saatleri (Sadece Ortak Savaώ Saatleri)
hide_session = input.session("1810-1630", "Gizlenecek Φlό Saatler (Kesiώim Dύώύ)", group="Zaman Kalkanύ")
tz = input.string("UTC+3", "Saat Dilimi", group="Zaman Kalkanύ")
in_hide_session = not na(time(timeframe.period, hide_session, tz))
is_weekend = (dayofweek == dayofweek.saturday or dayofweek == dayofweek.sunday)
should_hide = is_weekend or in_hide_session
// ═════════════════════════════════════════════════════════════════════════
// 2. άΗLά VERέ έSTέHBARATI VE GΦLGE FέYAT HESABI
// ═════════════════════════════════════════════════════════════════════════
c_local_raw = request.security(sym_local, timeframe.period, close, gaps=barmerge.gaps_on)
c_adr_raw = request.security(sym_adr, timeframe.period, close, gaps=barmerge.gaps_on)
c_fx_raw = request.security(sym_fx, timeframe.period, close, gaps=barmerge.gaps_on)
// Φlό saatleri filtrele (Veri zehirlenmesini φnle)
var float c_local = na
var float c_adr = na
var float c_fx = na
if not should_hide and c_local_raw > 0 and c_adr_raw > 0 and c_fx_raw > 0
c_local := c_local_raw
c_adr := c_adr_raw
c_fx := c_fx_raw
// GΦLGE FέYAT MATEMATέΠέ (Amerika'dan gelen sinyalin TL karώύlύπύ)
float implied_local = (not na(c_adr) and not na(c_fx)) ? (c_adr * c_fx) / adr_ratio : na
// ═════════════════════════════════════════════════════════════════════════
// 3. LOG-RASYO VE Z-SCORE ΗEKέRDEΠέ (Yerel vs Gφlge)
// ═════════════════════════════════════════════════════════════════════════
float ratio = (not na(c_local) and not na(implied_local)) ? (c_local / implied_local) : na
float logRatio = not na(ratio) ? math.log(ratio) : na
float ratioMean = ta.sma(logRatio, zLength)
float ratioDev = ta.stdev(logRatio, zLength)
float zScore = ratioDev > 0 ? (logRatio - ratioMean) / ratioDev : na
float absZ = math.abs(zScore)
// ═════════════════════════════════════════════════════════════════════════
// 4. INTEGRITY (GάVENLέK) VE QUALITY (KALέTE) HESAPLARI
// ═════════════════════════════════════════════════════════════════════════
float retA = (not na(c_local) and not na(c_local[1])) ? math.log(c_local / nz(c_local[1], c_local)) : na
float retB = (not na(implied_local) and not na(implied_local[1])) ? math.log(implied_local / nz(implied_local[1], implied_local)) : na
float pairCorr = ta.correlation(retA, retB, 60)
int shortLen = 20
float volShort = ta.stdev(logRatio, shortLen)
float volBase = ta.stdev(logRatio, 60)
float volExpansion = volBase > 0 ? volShort / volBase : na
float meanDrift = (ratioDev > 0 and not na(ratioMean[20])) ? math.abs(ratioMean - ratioMean[20]) / ratioDev : na
float corrNorm = na(pairCorr) ? 0.0 : math.max(0, math.min(1, (pairCorr + 1.0) / 2.0))
float driftNorm = na(meanDrift) ? 0.0 : math.max(0, math.min(1, 1.0 - meanDrift / 0.45))
float volNorm = na(volExpansion) ? 0.0 : math.max(0, math.min(1, 1.0 - math.max(0, volExpansion - 1.0) / 0.45))
float integrityScore = math.max(0, math.min(100, 100.0 * (0.45 * corrNorm + 0.30 * driftNorm + 0.25 * volNorm)))
bool integrityOk = integrityScore >= minIntegrity
// ═════════════════════════════════════════════════════════════════════════
// 5. STRATEJέ FάZYONU (SAVAή ALANI)
// ═════════════════════════════════════════════════════════════════════════
// Z-Score eksi ise: BIST (TCELL) ucuz kalmύώtύr -> LONG
bool t_long_giris = (zScore <= -entryZ) and integrityOk and barstate.isconfirmed
// Z-Score artύ ise: BIST (TCELL) pahalύlaώmύώtύr -> SHORT
bool t_short_giris = (zScore >= entryZ) and integrityOk and barstate.isconfirmed
if t_long_giris
strategy.entry("LONG", strategy.long)
if t_short_giris
strategy.entry("SHORT", strategy.short)
if strategy.position_size > 0 and zScore >= -exitZ and barstate.isconfirmed
strategy.close("LONG", comment="Makas Kapandύ (Denge)")
if strategy.position_size < 0 and zScore <= exitZ and barstate.isconfirmed
strategy.close("SHORT", comment="Makas Kapandύ (Denge)")
if not integrityOk and absZ >= entryZ and strategy.position_size != 0 and barstate.isconfirmed
strategy.close_all(comment="INTEGRITY BLOCK! Acil Tahliye")
// ═════════════════════════════════════════════════════════════════════════
// 6. GΦRSELLEήTέRME VE HUD PANEL
// ═════════════════════════════════════════════════════════════════════════
color position_bar_col = strategy.position_size > 0 ? color.new(color.aqua, 0) : strategy.position_size < 0 ? color.new(color.fuchsia, 0) : color.new(color.gray, 50)
barcolor(position_bar_col, title="Operasyon Bar Rengi")
plotshape(t_long_giris and strategy.position_size <= 0, "AL", shape.triangleup, location.belowbar, color.aqua, size=size.small)
plotshape(t_short_giris and strategy.position_size >= 0, "SAT", shape.triangledown, location.abovebar, color.red, size=size.small)
float br_kar = strategy.grossprofit
float br_zarar = strategy.grossloss
float kar_faktoru = br_zarar == 0 ? (br_kar > 0 ? 99.99 : 0.0) : (br_kar / br_zarar)
if barstate.islast
string isim1 = str.replace_all(sym_local, "BIST:", "")
color c_bull = color.rgb(34, 197, 166)
color c_bear = color.rgb(244, 114, 182)
color c_neut = color.rgb(245, 189, 92)
var table hud = table.new(position.top_right, 2, 7, bgcolor=color.new(#0D0D0D, 15), border_color=color.new(color.gray, 70), border_width=1)
table.cell(hud, 0, 0, "🌍 V9.1 KITALARARASI MATRIX 🌍", text_color=color.white, text_size=size.normal, bgcolor=color.new(color.purple, 40), text_halign=text.align_center)
table.merge_cells(hud, 0, 0, 1, 0)
table.cell(hud, 0, 1, "Gφlge Fiyat (NYSE'den)", text_color=color.silver, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 1, str.tostring(implied_local, "#.##") + " ₺", text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
color pf_color = kar_faktoru >= 1.2 ? c_bull : c_bear
table.cell(hud, 0, 2, "Kβr Faktφrό", text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 2, str.tostring(kar_faktoru, "#.##"), text_color=pf_color, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 0, 3, "Kύtalararasύ Z-Score", text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 3, str.tostring(zScore, "#.##"), text_color=absZ >= entryZ ? c_bear : c_bull, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 0, 4, "Gόvenlik Puanύ", text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 4, str.tostring(integrityScore, "#") + "/100", text_color=integrityOk ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 0, 5, isim1 + " Emri", text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 5, strategy.position_size > 0 ? "LONG (ALIM)" : strategy.position_size < 0 ? "SHORT (SATIM)" : "PUSUDA BEKLE", text_color=strategy.position_size > 0 ? c_bull : strategy.position_size < 0 ? c_bear : color.gray, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
string next_step = strategy.position_size != 0 ? "Tahliye Z: " + str.tostring(strategy.position_size > 0 ? -exitZ : exitZ, "#.##") : "Tetik Z: " + str.tostring(entryZ, "#.##")
table.cell(hud, 0, 6, "Sonraki Hamle", text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 6, next_step, text_color=c_neut, text_size=size.small, bgcolor=color.new(#161616, 0))
16.07.2024 - 10.12.2024
ηift z score φrneπi....
PHP Code:// © Kinetik Komuta Merkezi - V9.2 ΗέFT NAMLULU ARBέTRAJ MATRIX
//@version=6
strategy("V9.2 Ηift Namlulu Arbitraj", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.04)
// ═════════════════════════════════════════════════════════════════════════
// 1. GέRDέLER VE ARBέTRAJ CEPHANESέ
// ═════════════════════════════════════════════════════════════════════════
grp_sym = "Hedef Hisseler (Bacaklar)"
sym1 = input.symbol("BIST:MCARD", "1. Hisse (Ana Grafikteki)", group=grp_sym)
sym2 = input.symbol("BIST:NETCD", "2. Hisse (Kύyaslanan)", group=grp_sym)
grp_logic = "Ηift Namlulu Motor Ayarlarύ"
longZLength = input.int(240, "Aπύr Namlu (Uzun Z-Score)", minval=100, maxval=500, group=grp_logic)
shortZLength = input.int(80, "Hafif Namlu (Kύsa Z-Score)", minval=20, maxval=150, group=grp_logic)
entryZ = input.float(1.70, "Taarruz Sύnύrύ (+/-)", step=0.1, group=grp_logic)
exitZ = input.float(0.50, "Tahliye Sύnύrύ (Kύsa Namluya Gφre)", step=0.1, group=grp_logic)
minIntegrity = input.float(55.0, "Minimum Gόvenlik Puanύ (Integrity)", minval=0.0, maxval=100.0, group=grp_logic)
// BIST iηin φlό saatleri sόzme (Veri zehirlenmesi kalkanύ)
hide_session = input.session("1810-0950", "Gizlenecek Φlό Saatler", group="Zaman Kalkanύ")
tz = input.string("UTC+3", "Saat Dilimi", group="Zaman Kalkanύ")
in_hide_session = not na(time(timeframe.period, hide_session, tz))
is_weekend = (dayofweek == dayofweek.saturday or dayofweek == dayofweek.sunday)
should_hide = is_weekend or in_hide_session
// ═════════════════════════════════════════════════════════════════════════
// 2. VERέ έSTέHBARATI VE TEMέZLEME
// ═════════════════════════════════════════════════════════════════════════
c1_raw = request.security(sym1, timeframe.period, close, gaps=barmerge.gaps_on)
c2_raw = request.security(sym2, timeframe.period, close, gaps=barmerge.gaps_on)
var float c1 = na
var float c2 = na
if not should_hide and c1_raw > 0 and c2_raw > 0
c1 := c1_raw
c2 := c2_raw
// ═════════════════════════════════════════════════════════════════════════
// 3. ΗέFT NAMLULU LOG-RASYO VE Z-SCORE ΗEKέRDEΠέ
// ═════════════════════════════════════════════════════════════════════════
float ratio = (not na(c1) and not na(c2)) ? (c1 / c2) : na
float logRatio = not na(ratio) ? math.log(ratio) : na
// Aπύr Namlu (Uzun Periyot - Trend Makasύ)
float meanLong = ta.sma(logRatio, longZLength)
float devLong = ta.stdev(logRatio, longZLength)
float zLong = devLong > 0 ? (logRatio - meanLong) / devLong : na
// Hafif Namlu (Kύsa Periyot - Anlύk Baskύ)
float meanShort = ta.sma(logRatio, shortZLength)
float devShort = ta.stdev(logRatio, shortZLength)
float zShort = devShort > 0 ? (logRatio - meanShort) / devShort : na
float absZLong = math.abs(zLong)
// ═════════════════════════════════════════════════════════════════════════
// 4. INTEGRITY (GάVENLέK) VE QUALITY (KALέTE) HESAPLARI
// ═════════════════════════════════════════════════════════════════════════
float retA = (not na(c1) and not na(c1[1])) ? math.log(c1 / nz(c1[1], c1)) : na
float retB = (not na(c2) and not na(c2[1])) ? math.log(c2 / nz(c2[1], c2)) : na
float pairCorr = ta.correlation(retA, retB, 60)
float volShortInt = ta.stdev(logRatio, 20)
float volBaseInt = ta.stdev(logRatio, 60)
float volExpansion = volBaseInt > 0 ? volShortInt / volBaseInt : na
float meanDrift = (devLong > 0 and not na(meanLong[20])) ? math.abs(meanLong - meanLong[20]) / devLong : na
float corrNorm = na(pairCorr) ? 0.0 : math.max(0, math.min(1, (pairCorr + 1.0) / 2.0))
float driftNorm = na(meanDrift) ? 0.0 : math.max(0, math.min(1, 1.0 - meanDrift / 0.45))
float volNorm = na(volExpansion) ? 0.0 : math.max(0, math.min(1, 1.0 - math.max(0, volExpansion - 1.0) / 0.45))
float integrityScore = math.max(0, math.min(100, 100.0 * (0.45 * corrNorm + 0.30 * driftNorm + 0.25 * volNorm)))
bool integrityOk = integrityScore >= minIntegrity
// ═════════════════════════════════════════════════════════════════════════
// 5. STRATEJέ FάZYONU (ΗέFT TEYέTLέ TAARRUZ ALANI)
// ═════════════════════════════════════════════════════════════════════════
// έKέ NAMLU DA -1.70'έ DELERSE LONG
bool t_long_giris = (zLong <= -entryZ) and (zShort <= -entryZ) and integrityOk and barstate.isconfirmed
// έKέ NAMLU DA +1.70'έ DELERSE SHORT
bool t_short_giris = (zLong >= entryZ) and (zShort >= entryZ) and integrityOk and barstate.isconfirmed
if t_long_giris
strategy.entry("LONG", strategy.long)
if t_short_giris
strategy.entry("SHORT", strategy.short)
// TAHLέYE: Makas kapanύrken hύzlύ namlu (zShort) referans alύnύr. Erken kβr alύm saπlar.
if strategy.position_size > 0 and zShort >= -exitZ and barstate.isconfirmed
strategy.close("LONG", comment="Makas Kapandύ")
if strategy.position_size < 0 and zShort <= exitZ and barstate.isconfirmed
strategy.close("SHORT", comment="Makas Kapandύ")
// Acil Durum Kalkanύ (ήirket iflasύ vb. kardeώlik bozulmalarύnda zararύna iptal)
if not integrityOk and absZLong >= entryZ and strategy.position_size != 0 and barstate.isconfirmed
strategy.close_all(comment="INTEGRITY BLOCK! Tahliye")
// ═════════════════════════════════════════════════════════════════════════
// 6. GΦRSELLEήTέRME VE HUD PANEL
// ═════════════════════════════════════════════════════════════════════════
color position_bar_col = strategy.position_size > 0 ? color.new(color.aqua, 0) : strategy.position_size < 0 ? color.new(color.fuchsia, 0) : color.new(color.gray, 50)
barcolor(position_bar_col, title="Operasyon Bar Rengi")
plotshape(t_long_giris and strategy.position_size <= 0, "AL", shape.triangleup, location.belowbar, color.aqua, size=size.small)
plotshape(t_short_giris and strategy.position_size >= 0, "SAT", shape.triangledown, location.abovebar, color.red, size=size.small)
float br_kar = strategy.grossprofit
float br_zarar = strategy.grossloss
float kar_faktoru = br_zarar == 0 ? (br_kar > 0 ? 99.99 : 0.0) : (br_kar / br_zarar)
if barstate.islast
string isim1 = str.replace_all(sym1, "BIST:", "")
string isim2 = str.replace_all(sym2, "BIST:", "")
color c_bull = color.rgb(34, 197, 166)
color c_bear = color.rgb(244, 114, 182)
color c_neut = color.rgb(245, 189, 92)
var table hud = table.new(position.top_right, 2, 6, bgcolor=color.new(#0D0D0D, 15), border_color=color.new(color.gray, 70), border_width=1)
table.cell(hud, 0, 0, "⚔️ V9.2 ΗέFT NAMLULU MATRIX ⚔️", text_color=color.white, text_size=size.normal, bgcolor=color.new(#181818, 0), text_halign=text.align_center)
table.merge_cells(hud, 0, 0, 1, 0)
color pf_color = kar_faktoru >= 1.2 ? c_bull : c_bear
table.cell(hud, 0, 1, "Kβr Faktφrό", text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 1, str.tostring(kar_faktoru, "#.##"), text_color=pf_color, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
// έki Z-Score da panele yansύtύldύ
string z_texts = "Uzun: " + str.tostring(zLong, "#.##") + " | Kύsa: " + str.tostring(zShort, "#.##")
table.cell(hud, 0, 2, "Z-Score (Aπύr / Hafif)", text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 2, z_texts, text_color=math.abs(zLong) >= entryZ and math.abs(zShort) >= entryZ ? c_bear : c_bull, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 0, 3, "Gόvenlik Puanύ", text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 3, str.tostring(integrityScore, "#") + "/100", text_color=integrityOk ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 0, 4, isim1 + " Emri", text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 4, strategy.position_size > 0 ? "LONG (ALIM)" : strategy.position_size < 0 ? "SHORT (SATIM)" : "BEKLE", text_color=strategy.position_size > 0 ? c_bull : strategy.position_size < 0 ? c_bear : color.gray, text_size=size.small, bgcolor=color.new(#161616, 0))
string next_step = strategy.position_size != 0 ? "Tahliye (Kύsa Z): " + str.tostring(strategy.position_size > 0 ? -exitZ : exitZ, "#.##") : "Tetik Z: " + str.tostring(entryZ, "#.##")
table.cell(hud, 0, 5, "Sonraki Hamle", text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 5, next_step, text_color=c_neut, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
16.07.2024 - 10.12.2024
deneysel φrnek..
ηift z score-όηlό arbitraj φrneπi...
not.... Webhook ile Eώzamanlύ Tetikleme-Beta Nφtralizasyonu-Korelasyon Deπil, "Eώbόtόnleώme gibi kavramlar dikkate alύnmalύdύr...
tw de ilk ikisi matematiksel olarak yapύlsa bile eώbόtόnleώme yapύlamύyor...
TradingView Neden Bu Testi Yapamaz?
Engle-Granger testi iki aώamalύ, aπύr bir ekonometrik sόreηtir:
En Kόηόk Kareler Yφntemi (OLS Regresyonu): έki hissenin fiyat geηmiώini (MCARD ve NETCD) birbirine karώύ regrese edip aralarύndaki alfa ve beta katsayύlarύnύ bulur, ardύndan bu regresyonun Hata Terimlerini (Artύklarύ / Residuals) hesaplar. (Bunu zorlayarak Pine Script'te matrislerle yapabiliriz).
Geniώletilmiώ Dickey-Fuller (ADF) Birim Kφk Testi (Kritik Engel): Ηύkan bu hata terimlerinin "Duraπan (Stationary)" olup olmadύπύnύ test etmek gerekir. ADF testi, geηmiώ verinin kendi gecikmeli deπerleri (lags) όzerinden karmaώύk bir diferansiyel denklem kurar ve bunu Dickey-Fuller Kritik Deπer Tablosu ile kύyaslar.
έώte Pine Script burada felη oluyor. Pine Script'in istatistik kόtόphanesi ηok sύπdύr. Geηmiώe dφnόk dinamik matris regresyon katsayύlarύnύ ve ADF kritik deπer tablosunu (t-istatistiπi) anlύk barlarda koώturmaya kalkarsak TradingView sunucularύ "Hesaplama zaman aώύmύna uπradύ" diyerek robotu kapatύr. TV, grafik ηizmek ve basit dφngόler iηin dβhidir; ancak matris cebiri ve ekonometrik hipotez testleri iηin tasarlanmamύώtύr.
not kύsmύnύ gφrmezden gelirsek... deneysel φrneπin kodu....
[PHP// © Kinetik Komuta Merkezi - V9.3 άΗ ΗEKέRDEKLέ ARBέTRAJ MATRIX
//@version=6
strategy("V9.3 Tri-Core Arbitraj", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.04)
// ══════════════════════════════════════════════════ ═══════════════════════
// 1. GέRDέLER VE CEPHANELέK (3 HέSSE)
// ══════════════════════════════════════════════════ ═══════════════════════
grp_sym = "Hedef Hisseler (άηgen Kombinasyon)"
symA = input.symbol("BIST:MCARD", "A Hissesi", group=grp_sym)
symB = input.symbol("BIST:NETCD", "B Hissesi", group=grp_sym)
symC = input.symbol("BIST:DOFRB", "C Hissesi", group=grp_sym)
grp_logic = "Ηift Namlulu Motor Ayarlarύ"
longZLength = input.int(240, "Aπύr Namlu (Uzun Z-Score)", minval=100, maxval=500, group=grp_logic)
shortZLength = input.int(80, "Hafif Namlu (Kύsa Z-Score)", minval=20, maxval=150, group=grp_logic)
entryZ = input.float(1.70, "Taarruz Sύnύrύ (+/-)", step=0.1, group=grp_logic)
exitZ = input.float(0.50, "Tahliye Sύnύrύ (Kύsa Namluya Gφre)", step=0.1, group=grp_logic)
minIntegrity = input.float(55.0, "Minimum Gόvenlik Puanύ", minval=0.0, maxval=100.0, group=grp_logic)
hide_session = input.session("1810-0950", "Gizlenecek Φlό Saatler", group="Zaman Kalkanύ")
tz = input.string("UTC+3", "Saat Dilimi", group="Zaman Kalkanύ")
in_hide_session = not na(time(timeframe.period, hide_session, tz))
should_hide = (dayofweek == dayofweek.saturday or dayofweek == dayofweek.sunday) or in_hide_session
// ══════════════════════════════════════════════════ ═══════════════════════
// 2. VERέ έSTέHBARATI
// ══════════════════════════════════════════════════ ═══════════════════════
cA_raw = request.security(symA, timeframe.period, close, gaps=barmerge.gaps_on)
cB_raw = request.security(symB, timeframe.period, close, gaps=barmerge.gaps_on)
cC_raw = request.security(symC, timeframe.period, close, gaps=barmerge.gaps_on)
var float cA = na, var float cB = na, var float cC = na
if not should_hide and cA_raw > 0 and cB_raw > 0 and cC_raw > 0
cA := cA_raw, cB := cB_raw, cC := cC_raw
// ══════════════════════════════════════════════════ ═══════════════════════
// 3. KANTέTATέF MOTOR (ΦZEL FONKSέYON)
// ══════════════════════════════════════════════════ ═══════════════════════
f_arb_engine(price1, price2) =>
float ratio = (not na(price1) and not na(price2)) ? (price1 / price2) : na
float logRatio = not na(ratio) ? math.log(ratio) : na
float meanL = ta.sma(logRatio, longZLength)
float devL = ta.stdev(logRatio, longZLength)
float zLong = devL > 0 ? (logRatio - meanL) / devL : na
float meanS = ta.sma(logRatio, shortZLength)
float devS = ta.stdev(logRatio, shortZLength)
float zShort = devS > 0 ? (logRatio - meanS) / devS : na
float ret1 = (not na(price1) and not na(price1[1])) ? math.log(price1 / nz(price1[1], price1)) : na
float ret2 = (not na(price2) and not na(price2[1])) ? math.log(price2 / nz(price2[1], price2)) : na
float pairCorr = ta.correlation(ret1, ret2, 60)
float volShortInt = ta.stdev(logRatio, 20)
float volBaseInt = ta.stdev(logRatio, 60)
float volExpansion = volBaseInt > 0 ? volShortInt / volBaseInt : na
float meanDrift = (devL > 0 and not na(meanL[20])) ? math.abs(meanL - meanL[20]) / devL : na
float corrNorm = na(pairCorr) ? 0.0 : math.max(0, math.min(1, (pairCorr + 1.0) / 2.0))
float driftNorm = na(meanDrift) ? 0.0 : math.max(0, math.min(1, 1.0 - meanDrift / 0.45))
float volNorm = na(volExpansion) ? 0.0 : math.max(0, math.min(1, 1.0 - math.max(0, volExpansion - 1.0) / 0.45))
float integrityScore = math.max(0, math.min(100, 100.0 * (0.45 * corrNorm + 0.30 * driftNorm + 0.25 * volNorm)))
bool integrityOk = integrityScore >= minIntegrity
[zLong, zShort, integrityScore, integrityOk]
// άη farklύ cephe iηin motoru ηalύώtύr
[zL_AB, zS_AB, int_AB, ok_AB] = f_arb_engine(cA, cB) // Cephe 1: A vs B
[zL_AC, zS_AC, int_AC, ok_AC] = f_arb_engine(cA, cC) // Cephe 2: A vs C
[zL_BC, zS_BC, int_BC, ok_BC] = f_arb_engine(cB, cC) // Cephe 3: B vs C
// ══════════════════════════════════════════════════ ═══════════════════════
// 4. STRATEJέ FάZYONU (SAVAή ALANI)
// ══════════════════════════════════════════════════ ═══════════════════════
// έώlem Tetiπi (Strateji motoru sadece Grafikteki Hisse - A Hissesi iηin iώlem aηar, kβrύ oradan φlηer)
// A Hissesinin dahil olduπu en gόηlό makasύ bul
bool t_long_AB = (zL_AB <= -entryZ) and (zS_AB <= -entryZ) and ok_AB
bool t_short_AB = (zL_AB >= entryZ) and (zS_AB >= entryZ) and ok_AB
bool t_long_AC = (zL_AC <= -entryZ) and (zS_AC <= -entryZ) and ok_AC
bool t_short_AC = (zL_AC >= entryZ) and (zS_AC >= entryZ) and ok_AC
bool t_long_giris = (t_long_AB or t_long_AC) and barstate.isconfirmed
bool t_short_giris = (t_short_AB or t_short_AC) and barstate.isconfirmed
if t_long_giris
strategy.entry("LONG", strategy.long)
if t_short_giris
strategy.entry("SHORT", strategy.short)
// Tahliye (Herhangi bir aktif cephenin makasύ kapanύrsa ηύk)
bool tahliye_long = (zS_AB >= -exitZ) or (zS_AC >= -exitZ)
bool tahliye_short = (zS_AB <= exitZ) or (zS_AC <= exitZ)
if strategy.position_size > 0 and tahliye_long and barstate.isconfirmed
strategy.close("LONG", comment="Makas Kapandύ")
if strategy.position_size < 0 and tahliye_short and barstate.isconfirmed
strategy.close("SHORT", comment="Makas Kapandύ")
// Acil Tahliye (Gόvenlik έhlali)
bool acil_tahliye = (not ok_AB and math.abs(zL_AB) >= entryZ) or (not ok_AC and math.abs(zL_AC) >= entryZ)
if acil_tahliye and strategy.position_size != 0 and barstate.isconfirmed
strategy.close_all(comment="INTEGRITY BLOCK! Tahliye")
// ══════════════════════════════════════════════════ ═══════════════════════
// 5. DEV KOMUTA PANELέ (HUD)
// ══════════════════════════════════════════════════ ═══════════════════════
color position_bar_col = strategy.position_size > 0 ? color.new(color.aqua, 0) : strategy.position_size < 0 ? color.new(color.fuchsia, 0) : color.new(color.gray, 50)
barcolor(position_bar_col, title="Operasyon Bar Rengi")
float br_kar = strategy.grossprofit, float br_zarar = strategy.grossloss
float kar_faktoru = br_zarar == 0 ? (br_kar > 0 ? 99.99 : 0.0) : (br_kar / br_zarar)
if barstate.islast
string nA = str.replace_all(symA, "BIST:", "")
string nB = str.replace_all(symB, "BIST:", "")
string nC = str.replace_all(symC, "BIST:", "")
color c_bull = color.rgb(34, 197, 166)
color c_bear = color.rgb(244, 114, 182)
color c_neut = color.rgb(245, 189, 92)
var table hud = table.new(position.top_right, 4, 6, bgcolor=color.new(#0D0D0D, 15), border_color=color.new(color.gray, 70), border_width=1)
// άst Baώlύk
table.cell(hud, 0, 0, "⚔️ V9.3 TRI-CORE MATRIX ⚔️", text_color=color.white, text_size=size.normal, bgcolor=color.new(#181818, 0), text_halign=text.align_center)
table.merge_cells(hud, 0, 0, 3, 0)
// Sόtun Baώlύklarύ
table.cell(hud, 0, 1, "Kombinasyon (Cephe)", text_color=color.gray, text_size=size.small, bgcolor=color.new(#111111, 0))
table.cell(hud, 1, 1, "Z-Score (Aπύr/Hafif)", text_color=color.gray, text_size=size.small, bgcolor=color.new(#111111, 0))
table.cell(hud, 2, 1, "Gόvenlik", text_color=color.gray, text_size=size.small, bgcolor=color.new(#111111, 0))
table.cell(hud, 3, 1, "Sistem Emri", text_color=color.gray, text_size=size.small, bgcolor=color.new(#111111, 0))
// 1. Cephe (A vs B)
bool is_AB_active = math.abs(zL_AB) >= entryZ and math.abs(zS_AB) >= entryZ and ok_AB
string emir_AB = is_AB_active ? (zL_AB > 0 ? nA+" SAT\n"+nB+" AL" : nA+" AL\n"+nB+" SAT") : "BEKLE"
color c_AB = is_AB_active ? (zL_AB > 0 ? c_bear : c_bull) : color.gray
table.cell(hud, 0, 2, nA + " / " + nB, text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 2, str.tostring(zL_AB, "#.##") + " | " + str.tostring(zS_AB, "#.##"), text_color=math.abs(zL_AB)>=entryZ ? c_neut : color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 2, 2, str.tostring(int_AB, "#"), text_color=ok_AB ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 3, 2, emir_AB, text_color=c_AB, text_size=size.small, bgcolor=color.new(#161616, 0))
// 2. Cephe (A vs C)
bool is_AC_active = math.abs(zL_AC) >= entryZ and math.abs(zS_AC) >= entryZ and ok_AC
string emir_AC = is_AC_active ? (zL_AC > 0 ? nA+" SAT\n"+nC+" AL" : nA+" AL\n"+nC+" SAT") : "BEKLE"
color c_AC = is_AC_active ? (zL_AC > 0 ? c_bear : c_bull) : color.gray
table.cell(hud, 0, 3, nA + " / " + nC, text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 1, 3, str.tostring(zL_AC, "#.##") + " | " + str.tostring(zS_AC, "#.##"), text_color=math.abs(zL_AC)>=entryZ ? c_neut : color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 2, 3, str.tostring(int_AC, "#"), text_color=ok_AC ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
table.cell(hud, 3, 3, emir_AC, text_color=c_AC, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
// 3. Cephe (B vs C)
bool is_BC_active = math.abs(zL_BC) >= entryZ and math.abs(zS_BC) >= entryZ and ok_BC
string emir_BC = is_BC_active ? (zL_BC > 0 ? nB+" SAT\n"+nC+" AL" : nB+" AL\n"+nC+" SAT") : "BEKLE"
color c_BC = is_BC_active ? (zL_BC > 0 ? c_bear : c_bull) : color.gray
table.cell(hud, 0, 4, nB + " / " + nC, text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 1, 4, str.tostring(zL_BC, "#.##") + " | " + str.tostring(zS_BC, "#.##"), text_color=math.abs(zL_BC)>=entryZ ? c_neut : color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 2, 4, str.tostring(int_BC, "#"), text_color=ok_BC ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#161616, 0))
table.cell(hud, 3, 4, emir_BC, text_color=c_BC, text_size=size.small, bgcolor=color.new(#161616, 0))
// Alt Kύsύm: Kβr Faktφrό Φzeti
table.cell(hud, 0, 5, "Sistem Kβr Faktφrό", text_color=color.white, text_size=size.small, bgcolor=color.new(#111111, 0))
table.merge_cells(hud, 0, 5, 2, 5)
table.cell(hud, 3, 5, str.tostring(kar_faktoru, "#.##"), text_color=kar_faktoru >= 1.2 ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#111111, 0), text_style=text.format_bold)][/PHP]
16.07.2024 - 10.12.2024
Yer έmleri