[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: small ela code question



PureBytes Links

Trading Reference Links

> Could someone please tell me how to code the following paintbar study
> 
> color a bar X days in the past
> 
> so lets say I wanted to paint a bar that was 20 days ago...and then this
> bar moves over each day as I add end of day data?
> 
> thanks
> 
> Andy

Andy,
small answer - not the correct one, but will help

~~~~~~~~~~~~~~~~~~~~~~~
PAINTBAR:
input: length(20);
plot1[length] (high[length],"");
plot2[length] (Low[length],"");
~~~~~~~~~~~~~~~~~~~~~~~ 

this will paint ALL bars BEFORE that "input" (20) window with a certain colour - so 
UNpainted remain those which are IN the last period - obvious the first one is the 
ONE you like to see,,,,

there are better, nicer and other solutions - but I dont havem :-))

you could use a plot3 and 4 to repaint the former bars in length 21 in the 
ORIGINAL colour if youre that desperate :-))

rgds hans
Easy Language for runaways