seydkamal123
@t_seydkamal123
Ne tavsiye etmek istersiniz?
önceki makale
پیام های تریدر
filtre
sinyal türü

// versiyon = 5 Strateji ("EMA Crossover + RSI Filtresi (Uzun/Sat) - Basit", Overlay = True, default_qty_type = strateji.percent_of_equity, default_qty_value = 10, initial_capital = 10000) // ======= Girişler (قابل تغییر) ======= fastlen = input.int (9, "hızlı ema uzunluğu") Slowlen = input.int (21, "Slow Ema uzunluğu") RSilen = Input.Int (14, "RSI uzunluğu") RSilongmin = Input.Int (45, "Uzun için Min RSI (filtre)") rsishortmax = input.int (55, "Kısa için Max RSI (filtre)") USeshorts = Input.Bool (Yanlış, "Şüphelere İzin Verin? atrlen = input.int (14, "ATR uzunluğu (SL için)") atrmult = input.float (2.0, "ATR çarpanı (SL için)") TakeProfitr = Input.float (1.5, "Kâr Al (x ATR)", Adım = 0.1) Tradesizepct = input.float (10, "konum boyutu (% özsermaye)", adım = 0.1) // ======= Göstergeler ======= emafast = ta.ema (kapat, fastlen) emaslow = ta.ema (kapat, slowlen) rsival = ta.rsi (kapanış, rsilen) atrval = ta.atr (atrlen) // emas çiz PLAN (EMAFAST, Title = "Ema Fast", Linewidth = 2) Plot (EMASLOW, başlık = "Ema Slow", Linewidth = 2) // ======= Sinyaller ======= // Uzun sinyal: EMA yavaş yavaş ve Filtrenin üzerindeki RSI LongSignal = ta.crossover (emafast, emaslow) ve (rsival> = rsilongmin) // Sat/Kısa Sinyal: EMA FILT Cross Yavaş ve RSI Filtrenin Altında shortSignal = ta.crossunder (emafast, emaslow) ve (rsival <= rsishortmax) // ======= Giriş / Çıkış ======= // pozisyon boyutlandırma Strategy.risk.allow_entry_in (Strategy.Direction.long) Strategy.risk.allow_entry_in (Strategy.Direction.Short) strateji.order_info (true) strateji.exit_on_close (true) Strategy.set_max_bar_back (Math.max (fastlen, slowlen, rsilen, atrlen)) // SL ve TP fiyat seviyelerini hesaplayın (mutlak) longstopprice = kapat - atrval * atrmult longtpprice = close + atrval * TakeProfitr ShortstopPrice = Close + Atrval * Atrmult Shorttpprice = Kapat - AtrVal * TakeProfitr // pozisyon boyutlandırmasını yönetin Strategy.risk.allow_entry_in (Strategy.Direction.long) Strategy.risk.allow_entry_in (Strategy.Direction.Short) strateji.order_info (true) Strategy.Entry ("Long", Strategy.long, qty_percent = TradesizePct, ne zaman = longSignal) Useshort ederse Strategy.Entry ("Kısa", Strategy.Short, Qty_Percent = TradesIZEPCT, ne zaman = ShortSignal) başka // اگر شورت فعال نیست ، سیگنال شورت فقط باعث بستن لانگ میشود ShortSignal ise Strategy.Close ("uzun", yorum = "closinelong_on_shortsignal") // girişler için çıkışlar (yalnızca pozisyon varsa) // TP/SL'yi strateji ile uygulayın. strateji.exit ("long_exit", from_entry = "uzun", stop = longstopprice, limit = longtpprice) Useshort ederse Strategy.exit ("Short_exit", from_entry = "kısa", stop = shortstopprice, limit = shorttpprice) // ======= Visual ======= PlotShape (LongSignal, Title = "Uzun Sinyal", Location = Location.Belowbar, Color = Color.New (Color.Green, 0), Style = Shape.Labelup, Metin = "Uzun") PlotShape (ShortSignal, Title = "Sat/Kısa Sinyal", Location = Location.BoveBar, Color = Color.New (Color.Red, 0), Style = Shape.Labeldown, Text = "Sat") // RSI paneli RSIPLOT = PLOT (RSival, Title = "RSI", Display = Display.Non) // Fiyat bölmesinde gizle H1 = HLINE (50, "RSI 50", renk = color.gray, linestyle = hline.style_dotted) // ======= Uyarılar ======= AlertCondition (LongSignal, Title = "Uzun Sinyal", Mesaj = "EMA Crossover + RSI => Uzun") AlertCondition (ShortSignal, Title = "Satış Sinyali", Mesaj = "EMA Crossover + RSI => Sat/Kısa") // ======= Bilgi (küçük etiket yazdırın) ======= var tablo bilgisi = tablo. Barstate.islast Tablo.cell (bilgi, 0, 0, metin = "Ema:" + str.toString (fastLen) + "/" + str.toString (SlowLen) + "Rsi:" + str.toString (rsilen) + "atrx:" + str.toString (atrmult), text_color = color.white, bgcolor = color.new (color.blue, 60))

// versiyon = 5 Gösterge ("Ema + RSI sinyalleri (ışık)", kaplama = true) // ==== Girişler ==== fastlen = input.int (9, "hızlı ema uzunluğu") Slowlen = input.int (21, "Slow Ema uzunluğu") RSilen = Input.Int (14, "RSI uzunluğu") rsilongmin = input.int (45, "uzun süre için min rsi") rsishortmax = input.int (55, "Satış için Max RSI") // ==== hesaplamalar ==== emafast = ta.ema (kapat, fastlen) emaslow = ta.ema (kapat, slowlen) rsival = ta.rsi (kapanış, rsilen) // ==== sinyaller ==== LongSignal = ta.crossover (emafast, emaslow) ve (rsival> = rsilongmin) SellSignal = ta.crossunder (emafast, emaslow) ve (rsival <= rsishortmax) // ==== Çizim EMAS ==== Çizim (emafast, color = color.green, linewidth = 2) Çizim (emaslow, color = color.Red, linewidth = 2) // ==== Çizim sinyalleri ==== PlotShape (LongSignal, Title = "Long", Location = Location.Belowbar, Color = Color.Green, Style = Shape.Labelup, Metin = "Uzun") PlotShape (SellSignal, Title = "Sat", Location = Location.BoveBar, Color = Color.Red, Style = Shape.Labeldown, Text = "Sat") // ==== Uyarılar ==== uyarma (longSignal, başlık = "uzun uyarı", mesaj = "uzun sinyal tetiklenir") AlertCondition (SellSignal, Title = "Satış Satıcı", Message = "Satış Sinyali Tetiklendi")

// versiyon = 5 Gösterge ("Ema + RSI sinyalleri (ışık)", kaplama = true) // ==== Girişler ==== fastlen = input.int (9, "hızlı ema uzunluğu") Slowlen = input.int (21, "Slow Ema uzunluğu") RSilen = Input.Int (14, "RSI uzunluğu") rsilongmin = input.int (45, "uzun süre için min rsi") rsishortmax = input.int (55, "Satış için Max RSI") // ==== hesaplamalar ==== emafast = ta.ema (kapat, fastlen) emaslow = ta.ema (kapat, slowlen) rsival = ta.rsi (kapanış, rsilen) // ==== sinyaller ==== LongSignal = ta.crossover (emafast, emaslow) ve (rsival> = rsilongmin) SellSignal = ta.crossunder (emafast, emaslow) ve (rsival <= rsishortmax) // ==== Çizim EMAS ==== Çizim (emafast, color = color.green, linewidth = 2) Çizim (emaslow, color = color.Red, linewidth = 2) // ==== Çizim sinyalleri ==== PlotShape (LongSignal, Title = "Long", Location = Location.Belowbar, Color = Color.Green, Style = Shape.Labelup, Metin = "Uzun") PlotShape (SellSignal, Title = "Sat", Location = Location.BoveBar, Color = Color.Red, Style = Shape.Labeldown, Text = "Sat") // ==== Uyarılar ==== uyarma (longSignal, başlık = "uzun uyarı", mesaj = "uzun sinyal tetiklenir") AlertCondition (SellSignal, Title = "Satış Satıcı", Message = "Satış Sinyali Tetiklendi")

// versiyon = 5 Strateji ("EMA Crossover + RSI Filtresi (Uzun/Sat) - Basit", Overlay = True, default_qty_type = strateji.percent_of_equity, default_qty_value = 10, initial_capital = 10000) // ======= Girişler (قابل تغییر) ======= fastlen = input.int (9, "hızlı ema uzunluğu") Slowlen = input.int (21, "Slow Ema uzunluğu") RSilen = Input.Int (14, "RSI uzunluğu") RSilongmin = Input.Int (45, "Uzun için Min RSI (filtre)") rsishortmax = input.int (55, "Kısa için Max RSI (filtre)") USeshorts = Input.Bool (Yanlış, "Şüphelere İzin Verin? atrlen = input.int (14, "ATR uzunluğu (SL için)") atrmult = input.float (2.0, "ATR çarpanı (SL için)") TakeProfitr = Input.float (1.5, "Kâr Al (x ATR)", Adım = 0.1) Tradesizepct = input.float (10, "konum boyutu (% özsermaye)", adım = 0.1) // ======= Göstergeler ======= emafast = ta.ema (kapat, fastlen) emaslow = ta.ema (kapat, slowlen) rsival = ta.rsi (kapanış, rsilen) atrval = ta.atr (atrlen) // emas çiz PLAN (EMAFAST, Title = "Ema Fast", Linewidth = 2) Plot (EMASLOW, başlık = "Ema Slow", Linewidth = 2) // ======= Sinyaller ======= // Uzun sinyal: EMA yavaş yavaş ve Filtrenin üzerindeki RSI LongSignal = ta.crossover (emafast, emaslow) ve (rsival> = rsilongmin) // Sat/Kısa Sinyal: EMA FILT Cross Yavaş ve RSI Filtrenin Altında shortSignal = ta.crossunder (emafast, emaslow) ve (rsival <= rsishortmax) // ======= Giriş / Çıkış ======= // pozisyon boyutlandırma Strategy.risk.allow_entry_in (Strategy.Direction.long) Strategy.risk.allow_entry_in (Strategy.Direction.Short) strateji.order_info (true) strateji.exit_on_close (true) Strategy.set_max_bar_back (Math.max (fastlen, slowlen, rsilen, atrlen)) // SL ve TP fiyat seviyelerini hesaplayın (mutlak) longstopprice = kapat - atrval * atrmult longtpprice = close + atrval * TakeProfitr ShortstopPrice = Close + Atrval * Atrmult Shorttpprice = Kapat - AtrVal * TakeProfitr // pozisyon boyutlandırmasını yönetin Strategy.risk.allow_entry_in (Strategy.Direction.long) Strategy.risk.allow_entry_in (Strategy.Direction.Short) strateji.order_info (true) Strategy.Entry ("Long", Strategy.long, qty_percent = TradesizePct, ne zaman = longSignal) Useshort ederse Strategy.Entry ("Kısa", Strategy.Short, Qty_Percent = TradesIZEPCT, ne zaman = ShortSignal) başka // اگر شورت فعال نیست ، سیگنال شورت فقط باعث بستن لانگ میشود ShortSignal ise Strategy.Close ("uzun", yorum = "closinelong_on_shortsignal") // girişler için çıkışlar (yalnızca pozisyon varsa) // TP/SL'yi strateji ile uygulayın. strateji.exit ("long_exit", from_entry = "uzun", stop = longstopprice, limit = longtpprice) Useshort ederse Strategy.exit ("Short_exit", from_entry = "kısa", stop = shortstopprice, limit = shorttpprice) // ======= Visual ======= PlotShape (LongSignal, Title = "Uzun Sinyal", Location = Location.Belowbar, Color = Color.New (Color.Green, 0), Style = Shape.Labelup, Metin = "Uzun") PlotShape (ShortSignal, Title = "Sat/Kısa Sinyal", Location = Location.BoveBar, Color = Color.New (Color.Red, 0), Style = Shape.Labeldown, Text = "Sat") // RSI paneli RSIPLOT = PLOT (RSival, Title = "RSI", Display = Display.Non) // Fiyat bölmesinde gizle H1 = HLINE (50, "RSI 50", renk = color.gray, linestyle = hline.style_dotted) // ======= Uyarılar ======= AlertCondition (LongSignal, Title = "Uzun Sinyal", Mesaj = "EMA Crossover + RSI => Uzun") AlertCondition (ShortSignal, Title = "Satış Sinyali", Mesaj = "EMA Crossover + RSI => Sat/Kısa") // ======= Bilgi (küçük etiket yazdırın) ======= var tablo bilgisi = tablo. Barstate.islast Tablo.cell (bilgi, 0, 0, metin = "Ema:" + str.toString (fastLen) + "/" + str.toString (SlowLen) + "Rsi:" + str.toString (rsilen) + "atrx:" + str.toString (atrmult), text_color = color.white, bgcolor = color.new (color.blue, 60))

// versiyon = 5 Strateji ("EMA Crossover + RSI Filtresi (Uzun/Sat) - Basit", Overlay = True, default_qty_type = strateji.percent_of_equity, default_qty_value = 10, initial_capital = 10000) // ======= Girişler (قابل تغییر) ======= fastlen = input.int (9, "hızlı ema uzunluğu") Slowlen = input.int (21, "Slow Ema uzunluğu") RSilen = Input.Int (14, "RSI uzunluğu") RSilongmin = Input.Int (45, "Uzun için Min RSI (filtre)") rsishortmax = input.int (55, "Kısa için Max RSI (filtre)") USeshorts = Input.Bool (Yanlış, "Şüphelere İzin Verin? atrlen = input.int (14, "ATR uzunluğu (SL için)") atrmult = input.float (2.0, "ATR çarpanı (SL için)") TakeProfitr = Input.float (1.5, "Kâr Al (x ATR)", Adım = 0.1) Tradesizepct = input.float (10, "konum boyutu (% özsermaye)", adım = 0.1) // ======= Göstergeler ======= emafast = ta.ema (kapat, fastlen) emaslow = ta.ema (kapat, slowlen) rsival = ta.rsi (kapanış, rsilen) atrval = ta.atr (atrlen) // emas çiz PLAN (EMAFAST, Title = "Ema Fast", Linewidth = 2) Plot (EMASLOW, başlık = "Ema Slow", Linewidth = 2) // ======= Sinyaller ======= // Uzun sinyal: EMA yavaş yavaş ve Filtrenin üzerindeki RSI LongSignal = ta.crossover (emafast, emaslow) ve (rsival> = rsilongmin) // Sat/Kısa Sinyal: EMA FILT Cross Yavaş ve RSI Filtrenin Altında shortSignal = ta.crossunder (emafast, emaslow) ve (rsival <= rsishortmax) // ======= Giriş / Çıkış ======= // pozisyon boyutlandırma Strategy.risk.allow_entry_in (Strategy.Direction.long) Strategy.risk.allow_entry_in (Strategy.Direction.Short) strateji.order_info (true) strateji.exit_on_close (true) Strategy.set_max_bar_back (Math.max (fastlen, slowlen, rsilen, atrlen)) // SL ve TP fiyat seviyelerini hesaplayın (mutlak) longstopprice = kapat - atrval * atrmult longtpprice = close + atrval * TakeProfitr ShortstopPrice = Close + Atrval * Atrmult Shorttpprice = Kapat - AtrVal * TakeProfitr // pozisyon boyutlandırmasını yönetin Strategy.risk.allow_entry_in (Strategy.Direction.long) Strategy.risk.allow_entry_in (Strategy.Direction.Short) strateji.order_info (true) Strategy.Entry ("Long", Strategy.long, qty_percent = TradesizePct, ne zaman = longSignal) Useshort ederse Strategy.Entry ("Kısa", Strategy.Short, Qty_Percent = TradesIZEPCT, ne zaman = ShortSignal) başka // اگر شورت فعال نیست ، سیگنال شورت فقط باعث بستن لانگ میشود ShortSignal ise Strategy.Close ("uzun", yorum = "closinelong_on_shortsignal") // girişler için çıkışlar (yalnızca pozisyon varsa) // TP/SL'yi strateji ile uygulayın. strateji.exit ("long_exit", from_entry = "uzun", stop = longstopprice, limit = longtpprice) Useshort ederse Strategy.exit ("Short_exit", from_entry = "kısa", stop = shortstopprice, limit = shorttpprice) // ======= Visual ======= PlotShape (LongSignal, Title = "Uzun Sinyal", Location = Location.Belowbar, Color = Color.New (Color.Green, 0), Style = Shape.Labelup, Metin = "Uzun") PlotShape (ShortSignal, Title = "Sat/Kısa Sinyal", Location = Location.BoveBar, Color = Color.New (Color.Red, 0), Style = Shape.Labeldown, Text = "Sat") // RSI paneli RSIPLOT = PLOT (RSival, Title = "RSI", Display = Display.Non) // Fiyat bölmesinde gizle H1 = HLINE (50, "RSI 50", renk = color.gray, linestyle = hline.style_dotted) // ======= Uyarılar ======= AlertCondition (LongSignal, Title = "Uzun Sinyal", Mesaj = "EMA Crossover + RSI => Uzun") AlertCondition (ShortSignal, Title = "Satış Sinyali", Mesaj = "EMA Crossover + RSI => Sat/Kısa") // ======= Bilgi (küçük etiket yazdırın) ======= var tablo bilgisi = tablo. Barstate.islast Tablo.cell (bilgi, 0, 0, metin = "Ema:" + str.toString (fastLen) + "/" + str.toString (SlowLen) + "Rsi:" + str.toString (rsilen) + "atrx:" + str.toString (atrmult), text_color = color.white, bgcolor = color.new (color.blue, 60))

// version =6 indicator("TCP | Market Session | Session Analyzer", overlay=true, max_labels_count=500) // ───────────── 🕒 Minutes-to-Hours Helper Box group_minutes = "🕒 Minutes to Hours Helper" // Input: Minutes convertMinutes = input.int(90, "🛠️ Convert Minutes", minval=0, tooltip="Helper to convert minutes into hours (HH:MM)") // Conversion convertedHours = convertMinutes / 60.0 convertedHH = math.floor(convertMinutes / 60) convertedMM = convertMinutes % 60 convertedString = str.tostring(convertedHH, "00") + ":" + str.tostring(convertedMM, "00") // ───────────── تنظیمات جلسات group_sessions = "🌐 Session Settings (UTC - Minutes)" asiaStartMin = input.int(0, "Asia Start Time (UTC, minutes)", group=group_sessions, tooltip="Start of Asia session in minutes from midnight UTC.\nExample: 0 = 00:00 UTC") asiaEndMin = input.int(480, "Asia End Time (UTC, minutes)", group=group_sessions, tooltip="End of Asia session in minutes from midnight UTC.\nExample: 480 = 08:00 UTC") euroStartMin = input.int(420, "Europe Start Time (UTC, minutes)", group=group_sessions, tooltip="Start of Europe session in minutes from midnight UTC.\nExample: 420 = 07:00 UTC") euroEndMin = input.int(960, "Europe End Time (UTC, minutes)", group=group_sessions, tooltip="End of Europe session in minutes from midnight UTC.\nExample: 960 = 16:00 UTC") usStartMin = input.int(780, "US Start Time (UTC, minutes)", group=group_sessions, tooltip="Start of US session in minutes from midnight UTC.\nExample: 780 = 13:00 UTC") usEndMin = input.int(1260, "US End Time (UTC, minutes)", group=group_sessions, tooltip="End of US session in minutes from midnight UTC.\nExample: 1260 = 21:00 UTC") // ───────────── سایر تنظیمات maxPastDays = input.int(3, "Number of Past Days to Show Lines", minval=1, maxval=30) futureDays = input.int(2, "Number of Future Days to Show Lines", minval=0, maxval=10) labelYOffset = input.int(5, "Base Label Y Offset (ticks)", minval=1) labelSpacing = input.int(20, "Label Spacing Between Types (ticks)", minval=0) lookbackBars = input.int(20, "Lookback Bars for Max High", minval=1) useLocalTimezone = input.bool(false, "Use Chart's Local Timezone") showSessionLines = input.bool(true, "Show Vertical Session Lines") // ───────────── تنظیمات نمایش showAsiaSession = input.bool(true, "Show Asia Session") showEuropeSession = input.bool(true, "Show Europe Session") showUSSession = input.bool(true, "Show US Session") showLiquidityGrab = input.bool(true, "Show Liquidity Grab Labels") showCountdownTable = input.bool(true, "Show Countdown Table") showSessionBoxes = input.bool(true, "Show Session Boxes") // ───────────── رنگها asiaColor = color.new(color.green, 0) euroColor = color.new(color.orange, 0) usColor = color.new(color.blue, 0) asiaBoxColor = color.new(color.green, 85) euroBoxColor = color.new(color.orange, 85) usBoxColor = color.new(color.blue, 85) // تابع تشخیص حضور کندل در سشن tMin = useLocalTimezone ? (hour(time) * 60 + minute(time)) : (hour(time, "GMT+0") * 60 + minute(time, "GMT+0")) inSession(startMin, endMin) => (tMin >= startMin and tMin < endMin) // تابع تحلیل رفتار سشن f_behavior(_high, _low, _open, _close) => volatility = ta.stdev(close, 14) lowThreshold = volatility * 0.4 highThreshold = volatility * 0.8 rng = _high - _low body = math.abs(_close - _open) isTrend = body > rng * 0.4 and rng > highThreshold isConsolidation = rng < lowThreshold isManipulation = ((_high > _close and _low < _open) and body < rng * 0.4 and not isTrend) behavior = isTrend ? (_close > _open ? "Trend Up" : "Trend Down") : isConsolidation ? "Consolidation" : isManipulation ? "Manipulation" : "Range" behavior // ───────────── شکار نقدینگی lookbackLG = 12 highestPrev = ta.highest(high [1], lookbackLG) lowestPrev = ta.lowest(low [1], lookbackLG) useAtr = ta.atr(14) avgVolume = ta.sma(volume, 20) liqGrabUp = high > highestPrev and close < highestPrev liqGrabDown = low < lowestPrev and close > lowestPrev basicSignal = (liqGrabUp or liqGrabDown) strengthFilter = (high - low > useAtr * 0.6) and (volume > avgVolume * 1.05) confirmReversal = (liqGrabUp and close [1] < open [1]) or (liqGrabDown and close [1] > open [1]) liqGrabFinal = basicSignal and strengthFilter and confirmReversal var int lastSignalBar = na canPlotLabel = na(lastSignalBar) or (bar_index - lastSignalBar > 6) if showLiquidityGrab and liqGrabFinal and canPlotLabel label.new(bar_index, high, "Liquidity Grab", style=label.style_label_down, color=color.red, textcolor=color.white, size=size.tiny) lastSignalBar := bar_index // ───────────── تایمر پایان سشن getSessionEndTime(endMin) => timestamp(year(time), month(time), dayofmonth(time), math.floor(endMin / 60), endMin % 60) float timeLeftInSession = na if (showAsiaSession and inSession(asiaStartMin, asiaEndMin)) or (showEuropeSession and inSession(euroStartMin, euroEndMin)) or (showUSSession and inSession(usStartMin, usEndMin)) timeLeftInSession := (getSessionEndTime( inSession(asiaStartMin, asiaEndMin) ? asiaEndMin : inSession(euroStartMin, euroEndMin) ? euroEndMin : usEndMin) - time) / 60000 // ───────────── جدول شمارش معکوس getMinutesUntilSession(startMin) => nextTime = timestamp(year(time), month(time), dayofmonth(time), math.floor(startMin / 60), startMin % 60) nextTime < time ? (nextTime + 24 * 60 * 60 * 1000 - time) / 60000 : (nextTime - time) / 60000 currentSession = inSession(asiaStartMin, asiaEndMin) ? "Asia" : inSession(euroStartMin, euroEndMin) ? "Europe" : inSession(usStartMin, usEndMin) ? "US" : "None" float nextAsia = getMinutesUntilSession(asiaStartMin) float nextEuro = getMinutesUntilSession(euroStartMin) float nextUS = getMinutesUntilSession(usStartMin) nextSessionName = "" nextSessionIn = 0.0 if nextAsia < nextEuro and nextAsia < nextUS nextSessionName := "Asia" nextSessionIn := nextAsia else if nextEuro < nextUS nextSessionName := "Europe" nextSessionIn := nextEuro else nextSessionName := "US" nextSessionIn := nextUS var table countdownTable = table.new(position.top_right, 2, 5) if showCountdownTable and barstate.islast table.cell(countdownTable, 0, 0, "🕓 Current Session", text_color=color.white, bgcolor=color.new(color.black, 80)) table.cell(countdownTable, 1, 0, currentSession != "None" ? currentSession : "No Session", text_color=color.white, bgcolor=color.new(color.black, 60)) table.cell(countdownTable, 0, 1, "⏳ Time Left", text_color=color.white, bgcolor=color.new(color.black, 80)) table.cell(countdownTable, 1, 1, not na(timeLeftInSession) and currentSession != "None" ? str.tostring(math.max(timeLeftInSession, 0), "#.0") + " min" : "-", text_color=color.white, bgcolor=color.new(color.black, 60)) table.cell(countdownTable, 0, 2, "🔜 Next Session", text_color=color.white, bgcolor=color.new(color.black, 80)) table.cell(countdownTable, 1, 2, nextSessionName, text_color=color.white, bgcolor=color.new(color.black, 60)) table.cell(countdownTable, 0, 3, "⏱ Opens In", text_color=color.white, bgcolor=color.new(color.black, 80)) table.cell(countdownTable, 1, 3, str.tostring(math.round(nextSessionIn)) + " min", text_color=color.white, bgcolor=color.new(color.black, 60)) table.cell(countdownTable, 0, 4, text="Input: " + str.tostring(convertMinutes) , text_color=color.white, bgcolor=color.blue) table.cell(countdownTable, 1, 4, text="Converted: " + str.tostring(convertedHours, "#.##") + "h (" + convertedString + ")", text_color=color.white, bgcolor=color.blue) // ───────────── ذخیره دادههای سشن var float asiaHigh = na var float asiaLow = na var float asiaOpen = na var float asiaClose = na var string asiaResult = "Pending" var float euroHigh = na var float euroLow = na var float euroOpen = na var float euroClose = na var string euroResult = "Pending" var float usHigh = na var float usLow = na var float usOpen = na var float usClose = na var string usResult = "Pending" maxHigh = ta.highest(high, lookbackBars) fallbackHigh = na(maxHigh) ? close : maxHigh // ───────────── Box متغیرها var box asiaBox = na var box euroBox = na var box usBox = na // آسیا if showAsiaSession if inSession(asiaStartMin, asiaEndMin) asiaHigh := na(asiaHigh) ? high : math.max(asiaHigh, high) asiaLow := na(asiaLow) ? low : math.min(asiaLow, low) asiaOpen := na(asiaOpen) ? open : asiaOpen asiaClose := close if showSessionBoxes if na(asiaBox) asiaBox := box.new(bar_index, high, bar_index, low, bgcolor=asiaBoxColor, border_color=color.new(color.green, 70)) else box.set_right(asiaBox, bar_index) box.set_top(asiaBox, math.max(box.get_top(asiaBox), high)) box.set_bottom(asiaBox, math.min(box.get_bottom(asiaBox), low)) else if inSession(asiaStartMin, asiaEndMin) [1] and not inSession(asiaStartMin, asiaEndMin) asiaResult := f_behavior(asiaHigh, asiaLow, asiaOpen, asiaClose) asiaHigh := na asiaLow := na asiaOpen := na asiaClose := na asiaBox := na // اروپا if showEuropeSession if inSession(euroStartMin, euroEndMin) euroHigh := na(euroHigh) ? high : math.max(euroHigh, high) euroLow := na(euroLow) ? low : math.min(euroLow, low) euroOpen := na(euroOpen) ? open : euroOpen euroClose := close if showSessionBoxes if na(euroBox) euroBox := box.new(bar_index, high, bar_index, low, bgcolor=euroBoxColor, border_color=color.new(color.orange, 70)) else box.set_right(euroBox, bar_index) box.set_top(euroBox, math.max(box.get_top(euroBox), high)) box.set_bottom(euroBox, math.min(box.get_bottom(euroBox), low)) else if inSession(euroStartMin, euroEndMin) [1] and not inSession(euroStartMin, euroEndMin) euroResult := f_behavior(euroHigh, euroLow, euroOpen, euroClose) euroHigh := na euroLow := na euroOpen := na euroClose := na euroBox := na // آمریکا if showUSSession if inSession(usStartMin, usEndMin) usHigh := na(usHigh) ? high : math.max(usHigh, high) usLow := na(usLow) ? low : math.min(usLow, low) usOpen := na(usOpen) ? open : usOpen usClose := close if showSessionBoxes if na(usBox) usBox := box.new(bar_index, high, bar_index, low, bgcolor=usBoxColor, border_color=color.new(color.blue, 70)) else box.set_right(usBox, bar_index) box.set_top(usBox, math.max(box.get_top(usBox), high)) box.set_bottom(usBox, math.min(box.get_bottom(usBox), low)) else if inSession(usStartMin, usEndMin) [1] and not inSession(usStartMin, usEndMin) usResult := f_behavior(usHigh, usLow, usOpen, usClose) usHigh := na usLow := na usOpen := na usClose := na usBox := na // زمان سشنها getSessionTimestamp(sessionMin, dayOffset) => dayMs = 24 * 60 * 60 * 1000 baseDay = timestamp(year(time), month(time), dayofmonth(time), 0, 0) baseDay + dayOffset * dayMs + sessionMin * 60 * 1000 drawVerticalLineEx(_time, _color, _label, _style, _transp) => if not na(_time) line.new(x1 = _time, y1 = close * 1.2, x2 = _time, y2 = close * 0.8, xloc = xloc.bar_time, extend = extend.none, color = color.new(_color, _transp), width = 2, style = _style) isSessionStart(startMin, endMin) => inSession(startMin, endMin) and not inSession(startMin, endMin) [1] isSessionEnd(startMin, endMin) => not inSession(startMin, endMin) and inSession(startMin, endMin) [1] // رسم خطوط // رسم خطوط (تنظیم مستقل) if showSessionLines for dayOffset = -maxPastDays to futureDays transp = dayOffset < 0 ? math.min(90, math.abs(dayOffset) * 10) : dayOffset == 0 ? 0 : 40 if showAsiaSession drawVerticalLineEx(getSessionTimestamp(asiaStartMin, dayOffset), asiaColor, "Asia Session Start", line.style_dotted, transp) drawVerticalLineEx(getSessionTimestamp(asiaEndMin, dayOffset), asiaColor, "Asia Session End", line.style_solid, transp) if showEuropeSession drawVerticalLineEx(getSessionTimestamp(euroStartMin, dayOffset), euroColor, "Europe Session Start", line.style_dotted, transp) drawVerticalLineEx(getSessionTimestamp(euroEndMin, dayOffset), euroColor, "Europe Session End", line.style_solid, transp) if showUSSession drawVerticalLineEx(getSessionTimestamp(usStartMin, dayOffset), usColor, "US Session Start", line.style_dotted, transp) drawVerticalLineEx(getSessionTimestamp(usEndMin, dayOffset), usColor, "US Session End", line.style_solid, transp) // برچسبها tick = syminfo.mintick if showAsiaSession if isSessionStart(asiaStartMin, asiaEndMin) label.new(bar_index, fallbackHigh + tick * labelYOffset, "Asia Session Start", style=label.style_label_up, color=asiaColor, textcolor=color.white, size=size.normal) if isSessionEnd(asiaStartMin, asiaEndMin) label.new(bar_index, fallbackHigh + tick * (labelYOffset + labelSpacing), "Asia Session End: " + asiaResult, style=label.style_label_up, color=asiaColor, textcolor=color.white, size=size.normal) if showEuropeSession if isSessionStart(euroStartMin, euroEndMin) label.new(bar_index, fallbackHigh + tick * (labelYOffset + 2 * labelSpacing), "Europe Session Start", style=label.style_label_up, color=euroColor, textcolor=color.white, size=size.normal) if isSessionEnd(euroStartMin, euroEndMin) label.new(bar_index, fallbackHigh + tick * (labelYOffset + 3 * labelSpacing), "Europe Session End: " + euroResult, style=label.style_label_up, color=euroColor, textcolor=color.white, size=size.normal) if showUSSession if isSessionStart(usStartMin, usEndMin) label.new(bar_index, fallbackHigh + tick * (labelYOffset + 4 * labelSpacing), "US Session Start", style=label.style_label_up, color=usColor, textcolor=color.white, size=size.normal) if isSessionEnd(usStartMin, usEndMin) label.new(bar_index, fallbackHigh + tick * (labelYOffset + 5 * labelSpacing), "US Session End: " + usResult, style=label.style_label_up, color=usColor, textcolor=color.white, size=size.normal)
Sorumluluk Reddi
Sahmeto'nun web sitesinde ve resmi iletişim kanallarında yer alan herhangi bir içerik ve materyal, kişisel görüşlerin ve analizlerin bir derlemesidir ve bağlayıcı değildir. Borsa ve kripto para piyasasına alım, satım, giriş veya çıkış için herhangi bir tavsiye oluşturmazlar. Ayrıca, web sitesinde ve kanallarda yer alan tüm haberler ve analizler, yalnızca resmi ve gayri resmi yerli ve yabancı kaynaklardan yeniden yayınlanan bilgilerdir ve söz konusu içeriğin kullanıcılarının materyallerin orijinalliğini ve doğruluğunu takip etmekten ve sağlamaktan sorumlu olduğu açıktır. Bu nedenle, sorumluluk reddedilirken, sermaye piyasası ve kripto para piyasasındaki herhangi bir karar verme, eylem ve olası kar ve zarar sorumluluğunun yatırımcıya ait olduğu beyan edilir.