OPEN-SOURCE SCRIPT
已更新

First 15 Min High/Low

70
//version=5
indicator("First 15 Min High/Low", overlay=true)

// Define the session start time (adjust according to your market)
startHour = 9
startMinute = 30
endMinute = startMinute + 15

// Track the first 15 minutes of the day
isFirst15 = (hour == startHour and minute >= startMinute and minute < endMinute)

// New day logic
newDay = ta.change(time("D"))

// Hold values
var float first15High = na
var float first15Low = na
var bool isLocked = false

// Capture high/low during first 15 min
if newDay
first15High := na
first15Low := na
isLocked := false

if isFirst15 and not isLocked
first15High := na(first15High) ? high : math.max(high, first15High)
first15Low := na(first15Low) ? low : math.min(low, first15Low)

if not isFirst15 and not isLocked and not na(first15High) and not na(first15Low)
isLocked := true

// Plot
plot(isLocked ? first15High : na, title="First 15 Min High", color=color.green, linewidth=2, style=plot.style_line)
plot(isLocked ? first15Low : na, title="First 15 Min Low", color=color.red, linewidth=2, style=plot.style_line)
發行說明
This Will mark the First 15 min high/low for central time Traders
發行說明
This will mark the days high and low after the first 15 min of market open

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。