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

Re: "TrendLines-Automatic" code change in TS2000



PureBytes Links

Trading Reference Links

> If DataCompression >1 then condition1= RHDate[1]<>RHDate[1][1] 
>         else condition1=RHTime[1]<>RHTime[1][1];
> If condition1 then begin

Yeah, that was a well known bug in the TS4 code. The TrendLines
indicator only checked the date and not the time so it didn't work
properly on intraday data. I posted a slightly different fix years ago
that did the same thing. I don't have TS4 handy but, as I recall,
RHDate, RLDate, RHTime and RLTime are vars rather than arrays in TS4. (I
could be wrong about that.) Anyway my fix was something like

if rhdate<>rhdate[1] or rhtime<>rhtime[1] then begin.....

if rldate<>rldate[1] or rltime<>rltime[1] then begin.....

-- 
  Dennis