I drawverticalline to a future time (not bars) on a range chart. When I draw it initially I want to draw it as a dash line to show it in the future (got that part working fine). When the actual time hits I want to change the vertical line pen to a solid line (need help here). Or should I just redraw it.
I think I need to change the dashstyle on the verticalline pen using iverticalline. Not sure exactly how to code this. I looked on the forum and couldn't find a good example reference to use. I can also just remove the drawn line object and redraw the vertical line.
A second minor issue is Ninja will draw the line to the future time (bar) on the range chart where it thinks that time will be. I draw these line days in advance so they can be off by a lot by the time it actually hits. Currently I redraw the line periodically (I actually change the iverticalline time to something different and then back to the original) if the time is in the future to realign it to the chart. It works but didn't know if there was a cleaner way to fix this issue. I can do an f5 and everything will display correct but that is a real hassle.
Summary:
1) How do I change a previously drawvertialline dash to a solid line? or I draw a line in the future but when that time hits i want to display it differently.
2) What is the recommended way to realign a drawobject time drawn in the future to a time (not bars) on a non time (range) chart so it will be aligned correctly with the actual time?
Hope that makes sense.
Comment