An example of code if wanting just a simple vertical black line:
1
2
3
4
5
IFopendayofweek=5THEN
DRAWVLINE(barindex)
ENDIF
RETURN
Or, another example if wanting to draw a candle highlighted by its color, let’s say blue if close at least equal to open, and yellow if close below open (assuming these 2 colors are not the main ones on your chart, like green&red, or white&black…)
1
2
3
4
5
6
7
8
9
IFopendayofweek=5THEN
ifclose>=openTHEN
DRAWCANDLE(open,high,low,close)coloured("blue")
ELSE
DRAWCANDLE(open,high,low,close)coloured("yellow")
ENDIF
ENDIF
RETURN
Other things can be done such as drawing arrows above or below or both, etc…
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok