OPEN-SOURCE SCRIPT

Market Open Marker - NQ

39
//version=5
indicator("Market Open Marker - NQ", overlay=true)

// Define market open time (New York Time)
nyHour = 8
nyMinute = 0
nyTimezone = "America/New_York"

// Get today's timestamp for 8:00 AM in New York time
nySession = timestamp(nyTimezone, year(time), month(time), dayofmonth(time), nyHour, nyMinute)

// Check if the current bar time matches 8 AM NY time
showMarker = (time >= nySession and time < nySession + 60 * 1000) // Within 1 minute of 8 AM

// Plot vertical line at 8 AM New York Time
if showMarker
line.new(x1=bar_index, y1=high, x2=bar_index, y2=low, width=2, color=color.blue, style=line.style_dashed)

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.