How to add a vertical line (10th bar from right)?

B

birdie123

New member
I want to add a vertical line 10th bar from right axis. How to do it? Thanks.
 
M

mashume

Well-known member
VIP
This paints a vertical line 10 from the right hand side. Not 10 from the last bar with a value (be careful if you have an expansion area)
Code:
declare upper;

def t_bars = highestAll(barNumber());

addVerticalLine(barNumber() == t_bars - 10, "-10", color.lime);

-mashume
 
B

birdie123

New member
Thanks @mashume. You are the man!
 
Last edited:

Similar threads

Top