OPEN-SOURCE SCRIPT

7:15 PM Candle Highlighter

//version=5
indicator("7:15 PM Candle Highlighter", overlay=true)

// Define the time for the 7:15 PM candle
target_hour = 8
target_minute =30

// Check if the current candle matches the target time
is_target_candle = (hour == target_hour) and (minute == target_minute)

// Highlight the 7:15 PM candle with a rectangle
if is_target_candle
label.new(bar_index, high, "7:15 PM", color=color.new(color.blue, 0), textcolor=color.white, style=label.style_label_down, yloc=yloc.abovebar)
box.new(left=bar_index, top=high, right=bar_index+1, bottom=low, border_color=color.blue, bgcolor=color.new(color.blue, 90))

// Optional: Plot a shape on the chart to indicate the 7:15 PM candle
plotshape(is_target_candle, style=shape.labelup, location=location.belowbar, color=color.blue, text="7:15 PM", textcolor=color.white)

Penafian