OPEN-SOURCE SCRIPT
已更新 First 15 Min High/Low

//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)
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的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。