Hello all,
I’m trying to make an indicator that draws a vertical line every Friday at 2100 (close of the week)
I had a crack but it’s not accepting it…
IF CurrentDayOfWeek = 2 then
if DayOfWeek = 5
if Time=210000 then
DRAWVLINE(barindex)
ENDIF
return
Can anyone advise please?
Thanks, Angus
Welcome to the forums. Please use the ‘Insert PRT Code’ button when posting code in future poststo the forums as it makes it easier for others to read. I have tidied up your post for you. 🙂
Your code is short of some ENDIF’s and a THEN but also it is not possible to draw in the future. This will draw a vertical line every time 210000 bar occurs but not into the future:
if OpenDayOfWeek = 5 then
if Time = 210000 then
DRAWVLINE(barindex)
endif
endif
return