// 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)
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.