How to show a square

This is the place to discuss EdgeRater Chart Script

Moderator: Chris White

Post Reply
anon
Posts: 6
Joined: Tue Mar 29, 2011 3:25 pm

How to show a square

Post by anon »

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!
Chris White
Posts: 212
Joined: Mon Nov 29, 2010 9:21 pm

Re: How to show a square

Post by Chris White »

Here's a script that generates an event whenever the condition is true and then plots a square above the event bar:

Code: Select all

event:= C > REF(C,1) & REF(C, 1) > REF(C,2);

DRAWSHAPE(event,H, 1, false, -10 , 'SQUARE',1,'BLACK','MAGENTA');
and here's what that looks like on a chart:
showsquare.png
showsquare.png (52.78 KiB) Viewed 11879 times
Post Reply