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…
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue