How can I change the following code to draw a vertical line at the end of every Friday instead of drawing a triangle? Is there a more simple code strategy than what I'm using?
//@version=5
indicator("Friday Vertical Line", overlay=true)
var line fridayLine = na
// Check if it's Friday
isFriday = dayofweek == dayofweek.friday
// Check if it's the last candle of the day
isLastCandleOfDay = hour == 16 and minute == 0
// Draw a triangle only on the last candle of the day on Fridays
plotshape(series=isLastCandleOfDay and isFriday, color=color.orange, style=shape.triangleup, location=location.belowbar, size=size.small)
Well, you already use
isFridayandisLastCandleOfDayin yourplotshape()condition.Use the same expression and call
line.new().