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

Re: LastBarOnChart work-around?



PureBytes Links

Trading Reference Links

> if LastBarOnChart and time <> LastLBtime then begin
>    LastLBtime = time;
> end;
> 
> Any potential problems with this?

That's okay but it still uses 'time' which is problematic for tick
charts.

  if lastbaronchart

is the same as saying

  if date = lastcalcdate and time = lastcalctime

so TS is always going to get confused when there are multiple bars with
the same time stamp. Your code will run on the first bar with the new
time and then not run on subsequent bars with the same time. Too bad TS
can't calculate time to the second. That would take care of the problem.

-- 
  Dennis