PereParticipant
Veteran
Hi all.
How can I code to draw a vertical line (DRAWVLINE) every day at 9:00 hours? I am using PRT 10.3
With DRAWVLINE keyword. It should look like something like this: (not tested)
if time=090000 then
drawvline(barindex)
endif
return
Everyday at nine o’clock, a vertical line should be plotted. Please tell me if it is not the case 🙂
PereParticipant
Veteran
Thank you Nicolas, but unfortunately it does not work.
It only plots the vertical line once, the first time that time=090000, not every day.
It works for me. Please be sure to attach the indicator on a security which have a candlestick at 9 o’clock every day.
PereParticipant
Veteran
Thanks Nicolas.
It’s strange: I have the graphic in TF 1H, and the first bar is 9:00 and the last one at 17:00.
However, if I write time=100000 instead 090000, then it works perfectly, plotting the vertical line on the first bar every day, that means, at 9:00.
Thanks anyway.
Ok, so if the instrument have a starting time at 090000, change the “time” keyword in my code with “opentime” instead, it should be ok.
PereParticipant
Veteran
With opentime it doesn’t work in my graphic, but no problem, with time=100000 it’s perfect!
Thanks again!
Hi Nicolas,
I have tried this on the USDJPY and it works well. However it is appearing below the price action price chart on the indicator page and not on the chart. Is they anyway to place it on the price action chart like you have in your picture ?
Thanks for the insight and support
Kind Regards,
@simeong, please do not double post.