Hour Vertical Lines
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © xkavalis

//@version=5
indicator("Hour Vertical Lines", shorttitle="hVL",overlay=true)
cur_minute = minute
do_plot = false
if(cur_minute == 0 and cur_minute[1] > 0)
    do_plot := true
else
    do_plot := false

vline(BarIndex, Color, LineStyle, LineWidth) =>
    line.new(BarIndex, low - ta.tr, BarIndex, high + ta.tr, xloc.bar_index, extend.both, Color, LineStyle, LineWidth)

if (do_plot)
    vline(bar_index[0], #FF8000ff, line.style_dotted, 1)
    
