OPEN-SOURCE SCRIPT
vertical marker (latest)

//version=6
indicator("Latest Vertical Line Infinite", overlay=true, scale=scale.none)
// Session input
sess1 = input.float(9.0, "Session Time", minval=0.0, maxval=23.59)
// Color + opacity input
lineColor = input.color(color.new(color.black, 0), "Line Color")
// Fractional minutes
min1 = sess1 - math.floor(sess1)
// Trigger condition
cond1 = (hour == math.floor(sess1)) and (minute == int(min1 * 100))
// Store latest line
var line latestLine = na
// Create new infinite vertical line at the latest session
if cond1
if not na(latestLine)
line.delete(latestLine)
latestLine := line.new(x1=bar_index, y1=0, x2=bar_index, y2=1, xloc=xloc.bar_index, extend=extend.both, color=lineColor, width=1)
indicator("Latest Vertical Line Infinite", overlay=true, scale=scale.none)
// Session input
sess1 = input.float(9.0, "Session Time", minval=0.0, maxval=23.59)
// Color + opacity input
lineColor = input.color(color.new(color.black, 0), "Line Color")
// Fractional minutes
min1 = sess1 - math.floor(sess1)
// Trigger condition
cond1 = (hour == math.floor(sess1)) and (minute == int(min1 * 100))
// Store latest line
var line latestLine = na
// Create new infinite vertical line at the latest session
if cond1
if not na(latestLine)
line.delete(latestLine)
latestLine := line.new(x1=bar_index, y1=0, x2=bar_index, y2=1, xloc=xloc.bar_index, extend=extend.both, color=lineColor, width=1)
オープンソーススクリプト
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。