PROTECTED SOURCE SCRIPT

Compact Manual Execution Checklist + Session Boxes (Final)

27
//version=6
indicator("London & New York Market Open Lines", overlay=true)

// ==================================================
// MARKET OPEN TIME SETTINGS (CHART TIMEZONE)
// ==================================================
showLondonLine = input.bool(true, "Show London Open Line")
showNYLine = input.bool(true, "Show New York Open Line")

londonOpenTime = input.string("08:00", "London Open Time (HH:MM)")
nyOpenTime = input.string("13:00", "New York Open Time (HH:MM)")

// ==================================================
// LINE STYLE SETTINGS
// ==================================================
lineStyleInput = input.string(
"Dashed",
"Market Line Style",
options=["Solid", "Dashed", "Dotted"]
)

lineWidth = input.int(1, "Market Line Width", minval=1, maxval=4)

lineStyle =
lineStyleInput == "Dotted" ? line.style_dotted :
lineStyleInput == "Solid" ? line.style_solid :
line.style_dashed

// ==================================================
// TIME PARSING FUNCTION
// ==================================================
f_isMarketOpen(_timeStr) =>
hh = str.tonumber(str.substring(_timeStr, 0, 2))
mm = str.tonumber(str.substring(_timeStr, 3, 5))
hour == hh and minute == mm

// ==================================================
// LONDON MARKET OPEN LINE
// ==================================================
if showLondonLine and f_isMarketOpen(londonOpenTime)
line.new(
bar_index, low, bar_index, high,
extend=extend.both,
color=color.blue,
width=lineWidth,
style=lineStyle
)
label.new(
bar_index, high,
"LN OPEN",
style=label.style_label_down,
textcolor=color.white,
color=color.blue,
size=size.small
)

// ==================================================
// NEW YORK MARKET OPEN LINE
// ==================================================
if showNYLine and f_isMarketOpen(nyOpenTime)
line.new(
bar_index, low, bar_index, high,
extend=extend.both,
color=color.purple,
width=lineWidth,
style=lineStyle
)
label.new(
bar_index, high,
"NY OPEN",
style=label.style_label_down,
textcolor=color.white,
color=color.purple,
size=size.small
)

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน