seydkamal123
@t_seydkamal123
تریدر چه نمادی را توصیه به خرید کرده؟
سابقه خرید
تخمین بازدهی ماه به ماه تریدر
پیام های تریدر
فیلتر
نوع سیگنال

// نسخه =5 استراتژی("تقاطع EMA + فیلتر RSI (خرید/فروش) — ساده", overlay=true، default_qty_type=strategy.percent_of_equity, default_qty_value=10, initial_capital=10000) // ======= ورودیها (قابل تغییر) ======= fastLen = input.int(9, "طول EMA سریع") slowLen = input.int(21, "طول EMA کند") rsiLen = input.int(14, "طول RSI") rsiLongMin= input.int(45, "حداقل RSI برای خرید (فیلتر)") rsiShortMax= input.int(55, "حداکثر RSI برای فروش (فیلتر)") useShorts = input.bool(false,"مجوز فروش استقراضی؟ (اگر خاموش: فقط معاملات خرید در فروش بسته شوند)") atrLen = input.int(14, "طول ATR (برای حد ضرر)") atrMult = input.float(2.0,"ضریب ATR (برای حد ضرر)") takeProfitR = input.float(1.5, "حد سود (x ATR)", step=0.1) tradeSizePct = input.float(10, "اندازه موقعیت (% سرمایه)", step=0.1) // ======= اندیکاتورها ======= emaFast = ta.ema(close, fastLen) emaSlow = ta.ema(close, slowLen) rsiVal = ta.rsi(close, rsiLen) atrVal = ta.atr(atrLen) // نمایش EMA plot(emaFast, title="EMA سریع", linewidth=2) plot(emaSlow, title="EMA کند", linewidth=2) // ======= سیگنالها ======= // سیگنال خرید: عبور EMA سریع از بالا به پایین EMA کند و RSI بالاتر از فیلتر longSignal = ta.crossover(emaFast, emaSlow) and (rsiVal >= rsiLongMin) // سیگنال فروش/فروش استقراضی: عبور EMA سریع از پایین به بالای EMA کند و RSI پایینتر از فیلتر shortSignal = ta.crossunder(emaFast, emaSlow) and (rsiVal <= rsiShortMax) // ======= ورود / خروج ======= // تعیین اندازه موقعیت strategy.risk.allow_entry_in(strategy.direction.long) strategy.risk.allow_entry_in(strategy.direction.short) strategy.order_info(true) strategy.exit_on_close(true) strategy.set_max_bars_back(math.max(fastLen, slowLen, rsiLen, atrLen)) // محاسبه سطوح قیمت حد ضرر و حد سود (مطلق) longStopPrice = close - atrVal * atrMult longTPPrice = close + atrVal * takeProfitR shortStopPrice = close + atrVal * atrMult shortTPPrice = close - atrVal * takeProfitR // مدیریت اندازه موقعیت strategy.risk.allow_entry_in(strategy.direction.long) strategy.risk.allow_entry_in(strategy.direction.short) strategy.order_info(true) strategy.entry("Long", strategy.long, qty_percent=tradeSizePct, when=longSignal) if useShorts strategy.entry("Short", strategy.short, qty_percent=tradeSizePct, when=shortSignal) else // اگر فروش استقراضی فعال نیست، سیگنال فروش فقط باعث بستن موقعیت خرید میشود if shortSignal strategy.close("Long", comment="CloseLong_on_ShortSignal") // خروج برای ورودها (فقط اگر موقعیت وجود داشته باشد) // اعمال TP/SL با strategy.exit (با ارجاع به ورود id) strategy.exit("Long_exit", from_entry="Long", stop=longStopPrice, limit=longTPPrice) if useShorts strategy.exit("Short_exit", from_entry="Short", stop=shortStopPrice, limit=shortTPPrice) // ======= نمایش بصری ======= plotshape(longSignal, title="سیگنال خرید", location=location.belowbar, color=color.new(color.green,0), style=shape.labelup, text="LONG") plotshape(shortSignal, title="سیگنال فروش/فروش استقراضی", location=location.abovebar, color=color.new(color.red,0), style=shape.labeldown, text="SELL") // پنل RSI rsiPlot = plot(rsiVal, title="RSI", display=display.none) // پنهان کردن در پنل قیمت h1 = hline(50, "RSI 50", color=color.gray, linestyle=hline.style_dotted) // ======= هشدارها ======= alertcondition(longSignal, title="سیگنال خرید", message="تقاطع EMA + RSI => LONG") alertcondition(shortSignal, title="سیگنال فروش", message="تقاطع EMA + RSI => SELL/SHORT") // ======= اطلاعات (نمایش برچسب کوچک) ======= var table info = table.new(position.bottom_right, 1, 1) if barstate.islast table.cell(info, 0, 0, text="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))

// نسخه =5 اندیکاتور("سیگنالهای EMA + RSI (سبک)", overlay=true) // ==== ورودیها ==== fastLen = input.int(9, "طول EMA سریع") slowLen = input.int(21, "طول EMA کند") rsiLen = input.int(14, "طول RSI") rsiLongMin= input.int(45, "حداقل RSI برای خرید") rsiShortMax= input.int(55, "حداکثر RSI برای فروش") // ==== محاسبات ==== emaFast = ta.ema(close, fastLen) emaSlow = ta.ema(close, slowLen) rsiVal = ta.rsi(close, rsiLen) // ==== سیگنالها ==== longSignal = ta.crossover(emaFast, emaSlow) and (rsiVal >= rsiLongMin) sellSignal = ta.crossunder(emaFast, emaSlow) and (rsiVal <= rsiShortMax) // ==== نمایش EMAها ==== plot(emaFast, color=color.green, linewidth=2) plot(emaSlow, color=color.red, linewidth=2) // ==== نمایش سیگنالها ==== plotshape(longSignal, title="خرید", location=location.belowbar, color=color.green, style=shape.labelup, text="خرید") plotshape(sellSignal, title="فروش", location=location.abovebar, color=color.red, style=shape.labeldown, text="فروش") // ==== هشدارها ==== alertcondition(longSignal, title="هشدار خرید", message="سیگنال خرید فعال شد") alertcondition(sellSignal, title="هشدار فروش", message="سیگنال فروش فعال شد")

// نسخه =5 اندیکاتور("سیگنالهای EMA + RSI (سبک)", overlay=true) // ==== ورودیها ==== fastLen = input.int(9, "طول EMA سریع") slowLen = input.int(21, "طول EMA کند") rsiLen = input.int(14, "طول RSI") rsiLongMin= input.int(45, "حداقل RSI برای خرید") rsiShortMax= input.int(55, "حداکثر RSI برای فروش") // ==== محاسبات ==== emaFast = ta.ema(close, fastLen) emaSlow = ta.ema(close, slowLen) rsiVal = ta.rsi(close, rsiLen) // ==== سیگنالها ==== longSignal = ta.crossover(emaFast, emaSlow) and (rsiVal >= rsiLongMin) sellSignal = ta.crossunder(emaFast, emaSlow) and (rsiVal <= rsiShortMax) // ==== نمایش EMAها ==== plot(emaFast, color=color.green, linewidth=2) plot(emaSlow, color=color.red, linewidth=2) // ==== نمایش سیگنالها ==== plotshape(longSignal, title="خرید", location=location.belowbar, color=color.green, style=shape.labelup, text="خرید") plotshape(sellSignal, title="فروش", location=location.abovebar, color=color.red, style=shape.labeldown, text="فروش") // ==== هشدارها ==== alertcondition(longSignal, title="هشدار خرید", message="سیگنال خرید فعال شد") alertcondition(sellSignal, title="هشدار فروش", message="سیگنال فروش فعال شد")

// version =5 strategy("تقاطع EMA + فیلتر RSI (خرید/فروش) — ساده", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10, initial_capital=10000) // ======= ورودیها (قابل تغییر) ======= fastLen = input.int(9, "طول EMA سریع") slowLen = input.int(21, "طول EMA کند") rsiLen = input.int(14, "طول RSI") rsiLongMin= input.int(45, "حداقل RSI برای خرید (فیلتر)") rsiShortMax= input.int(55, "حداکثر RSI برای فروش (فیلتر)") useShorts = input.bool(false,"اجازه فروش استقراضی؟ (اگر خاموش: فقط بستن خریدها در فروش)") atrLen = input.int(14, "طول ATR (برای حد ضرر)") atrMult = input.float(2.0,"ضریب ATR (برای حد ضرر)") takeProfitR = input.float(1.5, "حد سود (x ATR)", step=0.1) tradeSizePct = input.float(10, "اندازه موقعیت (% سرمایه)", step=0.1) // ======= اندیکاتورها ======= emaFast = ta.ema(close, fastLen) emaSlow = ta.ema(close, slowLen) rsiVal = ta.rsi(close, rsiLen) atrVal = ta.atr(atrLen) // رسم EMAها plot(emaFast, title="EMA سریع", linewidth=2) plot(emaSlow, title="EMA کند", linewidth=2) // ======= سیگنالها ======= // سیگنال خرید: عبور EMA سریع از بالا به پایین EMA کند و RSI بالاتر از فیلتر longSignal = ta.crossover(emaFast, emaSlow) and (rsiVal >= rsiLongMin) // سیگنال فروش/فروش استقراضی: عبور EMA سریع از پایین به بالا EMA کند و RSI پایینتر از فیلتر shortSignal = ta.crossunder(emaFast, emaSlow) and (rsiVal <= rsiShortMax) // ======= ورود / خروج ======= // تعیین اندازه موقعیت strategy.risk.allow_entry_in(strategy.direction.long) strategy.risk.allow_entry_in(strategy.direction.short) strategy.order_info(true) strategy.exit_on_close(true) strategy.set_max_bars_back(math.max(fastLen, slowLen, rsiLen, atrLen)) // محاسبه سطوح قیمت حد ضرر و حد سود (مطلق) longStopPrice = close - atrVal * atrMult longTPPrice = close + atrVal * takeProfitR shortStopPrice = close + atrVal * atrMult shortTPPrice = close - atrVal * takeProfitR // مدیریت اندازه موقعیت strategy.risk.allow_entry_in(strategy.direction.long) strategy.risk.allow_entry_in(strategy.direction.short) strategy.order_info(true) strategy.entry("Long", strategy.long, qty_percent=tradeSizePct, when=longSignal) if useShorts strategy.entry("Short", strategy.short, qty_percent=tradeSizePct, when=shortSignal) else // اگر فروش استقراضی فعال نیست، سیگنال فروش فقط باعث بستن خرید میشود if shortSignal strategy.close("Long", comment="CloseLong_on_ShortSignal") // خروجها برای ورودها (فقط اگر موقعیت وجود داشته باشد) // اعمال حد سود/حد ضرر با strategy.exit (با ارجاع به ورود id) strategy.exit("Long_exit", from_entry="Long", stop=longStopPrice, limit=longTPPrice) if useShorts strategy.exit("Short_exit", from_entry="Short", stop=shortStopPrice, limit=shortTPPrice) // ======= نمایش بصری ======= plotshape(longSignal, title="سیگنال خرید", location=location.belowbar, color=color.new(color.green,0), style=shape.labelup, text="LONG") plotshape(shortSignal, title="سیگنال فروش/فروش استقراضی", location=location.abovebar, color=color.new(color.red,0), style=shape.labeldown, text="SELL") // پنل RSI rsiPlot = plot(rsiVal, title="RSI", display=display.none) // پنهان کردن در پنل قیمت h1 = hline(50, "RSI 50", color=color.gray, linestyle=hline.style_dotted) // ======= هشدارها ======= alertcondition(longSignal, title="سیگنال خرید", message="تقاطع EMA + RSI => خرید") alertcondition(shortSignal, title="سیگنال فروش", message="تقاطع EMA + RSI => فروش/فروش استقراضی") // ======= اطلاعات (چاپ برچسب کوچک) ======= var table info = table.new(position.bottom_right, 1, 1) if barstate.islast table.cell(info, 0, 0, text="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 =5 strategy("تقاطع EMA + فیلتر RSI (خرید/فروش) - ساده", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10, initial_capital=10000) // ======= ورودیها (قابل تغییر) ======= fastLen = input.int(9, "طول EMA سریع") slowLen = input.int(21, "طول EMA کند") rsiLen = input.int(14, "طول RSI") rsiLongMin= input.int(45, "حداقل RSI برای خرید (فیلتر)") rsiShortMax= input.int(55, "حداکثر RSI برای فروش (فیلتر)") useShorts = input.bool(false,"آیا فروش استقراضی مجاز است؟ (اگر خاموش: فقط موقعیتهای خرید در فروش بسته شوند)") atrLen = input.int(14, "طول ATR (برای حد ضرر)") atrMult = input.float(2.0,"ضریب ATR (برای حد ضرر)") takeProfitR = input.float(1.5, "حد سود (x ATR)", step=0.1) tradeSizePct = input.float(10, "اندازه موقعیت (% از سرمایه)", step=0.1) // ======= اندیکاتورها ======= emaFast = ta.ema(close, fastLen) emaSlow = ta.ema(close, slowLen) rsiVal = ta.rsi(close, rsiLen) atrVal = ta.atr(atrLen) // رسم EMAها plot(emaFast, title="EMA سریع", linewidth=2) plot(emaSlow, title="EMA کند", linewidth=2) // ======= سیگنالها ======= // سیگنال خرید: عبور EMA سریع از بالا به پایین EMA کند و RSI بالای فیلتر longSignal = ta.crossover(emaFast, emaSlow) and (rsiVal >= rsiLongMin) // سیگنال فروش/فروش استقراضی: عبور EMA سریع از پایین به بالای EMA کند و RSI پایین فیلتر shortSignal = ta.crossunder(emaFast, emaSlow) and (rsiVal <= rsiShortMax) // ======= ورود / خروج ======= // تعیین اندازه موقعیت strategy.risk.allow_entry_in(strategy.direction.long) strategy.risk.allow_entry_in(strategy.direction.short) strategy.order_info(true) strategy.exit_on_close(true) strategy.set_max_bars_back(math.max(fastLen, slowLen, rsiLen, atrLen)) // محاسبه سطوح قیمت حد ضرر و حد سود (مطلق) longStopPrice = close - atrVal * atrMult longTPPrice = close + atrVal * takeProfitR shortStopPrice = close + atrVal * atrMult shortTPPrice = close - atrVal * takeProfitR // مدیریت اندازه موقعیت strategy.risk.allow_entry_in(strategy.direction.long) strategy.risk.allow_entry_in(strategy.direction.short) strategy.order_info(true) strategy.entry("Long", strategy.long, qty_percent=tradeSizePct, when=longSignal) if useShorts strategy.entry("Short", strategy.short, qty_percent=tradeSizePct, when=shortSignal) else // اگر شورت فعال نیست، سیگنال شورت فقط باعث بستن لانگ میشود if shortSignal strategy.close("Long", comment="CloseLong_on_ShortSignal") // خروج برای ورود (فقط اگر موقعیت وجود داشته باشد) // اعمال حد سود/ضرر با strategy.exit (ارجاع به ورود id) strategy.exit("Long_exit", from_entry="Long", stop=longStopPrice, limit=longTPPrice) if useShorts strategy.exit("Short_exit", from_entry="Short", stop=shortStopPrice, limit=shortTPPrice) // ======= نمایش ======= plotshape(longSignal, title="سیگنال خرید", location=location.belowbar, color=color.new(color.green,0), style=shape.labelup, text="LONG") plotshape(shortSignal, title="سیگنال فروش/فروش استقراضی", location=location.abovebar, color=color.new(color.red,0), style=shape.labeldown, text="SELL") // پنل RSI rsiPlot = plot(rsiVal, title="RSI", display=display.none) // مخفی کردن در پنل قیمت h1 = hline(50, "RSI 50", color=color.gray, linestyle=hline.style_dotted) // ======= هشدارها ======= alertcondition(longSignal, title="سیگنال خرید", message="تقاطع EMA + RSI => خرید") alertcondition(shortSignal, title="سیگنال فروش", message="تقاطع EMA + RSI => فروش/فروش استقراضی") // ======= اطلاعات (چاپ برچسب کوچک) ======= var table info = table.new(position.bottom_right, 1, 1) if barstate.islast table.cell(info, 0, 0, text="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)
سلب مسئولیت
هر محتوا و مطالب مندرج در سایت و کانالهای رسمی ارتباطی سهمتو، جمعبندی نظرات و تحلیلهای شخصی و غیر تعهد آور بوده و هیچگونه توصیهای مبنی بر خرید، فروش، ورود و یا خروج از بازار بورس و ارز دیجیتال نمی باشد. همچنین کلیه اخبار و تحلیلهای مندرج در سایت و کانالها، صرفا بازنشر اطلاعات از منابع رسمی و غیر رسمی داخلی و خارجی است و بدیهی است استفاده کنندگان محتوای مذکور، مسئول پیگیری و حصول اطمینان از اصالت و درستی مطالب هستند. از این رو ضمن سلب مسئولیت اعلام میدارد مسئولیت هرنوع تصمیم گیری و اقدام و سود و زیان احتمالی در بازار سرمایه و ارز دیجیتال، با شخص معامله گر است.