I am a little rusty on my programming
How would I show a square for every occurance where close>close[1] and close[1]>close[2]
each time I try it only plots a square on the current close - not past occurances where the condition was met
thanks!
How to show a square
Moderator: Chris White
-
- Posts: 212
- Joined: Mon Nov 29, 2010 9:21 pm
Re: How to show a square
Here's a script that generates an event whenever the condition is true and then plots a square above the event bar:
and here's what that looks like on a chart:
Code: Select all
event:= C > REF(C,1) & REF(C, 1) > REF(C,2);
DRAWSHAPE(event,H, 1, false, -10 , 'SQUARE',1,'BLACK','MAGENTA');