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

Re: Plotpaintbar only once?



PureBytes Links

Trading Reference Links

> Maybe you could help me with one other question. Instead of using
> "close" for the bar, what language do I put in, to paint the first
> bar that trades at "myprice", and not only closes at my price.  Do
> I replace the close with (high,low)? 
> 
> > vars:  PaintToday(False);
> > if Date <> Date[1] then PaintToday = False;
> > If PaintToday = False and close = 30 then begin
> >   Plotpaintbar(High,Low,"myprice");
> >   PaintToday = True;
> > end;

Change the "close = 30" to "Low <= myprice and High >= myprice".  
That will be true on any bar that contains your price.  The 
PaintToday test will ensure you only paint it once.

Gary