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

Re: LastBarOnChart work-around?



PureBytes Links

Trading Reference Links

Hmmm.  Could be many things.  Are you using more than
one data source?  If so, try:  

If lastbaronchart of data1 and lastbaronchart of data2
...

etc. since by default variables live in data1 space
and they are different.  
 
Jack


--- ztrader <ztrader@xxxxxxxxx> wrote:
> LastBarOnChart seems to execute more than once on
> tick charts. If
> anyone has found a way to get it to work reliably,
> but just once on the
> 'real' last bar, I'd appreciate knowing how.
> 
> Otherwise, would the following work-around eliminate
> the multiple
> executions in real time? I realize it would not
> execute on each 'last
> bar' - I'm trying to avoid multiple executions on
> the same bar.
> 
> if LastBarOnChart and time <> LastLBtime then begin
>    LastLBtime = time;
> end;
> 
> Any potential problems with this?
> 
> Thanks,
> 
> ztrader
> 
>