PureBytes Links
Trading Reference Links
|
Jim,
For some strange reason, unknown to me, comparisons such as Date <> Date[1]
and Time <> Time[1] do not always give the results that you would expect --
When the problem occurs, I have printed out the values of the offending
function and verified that the values change as you would expect-- but, the
comparison test does not recognize the change in values. For that reason, I
always assign Time and Date to variables for testing, which gets around the
problem.
A few weeks ago, someone on the list, was having the same problem with EL
code and I suggested this fix and it produced the result he was looking for.
It appears to be an intermittent problem, but I don't know anything about
how, why, or when it will occur-- so, I always use this work-around.
-------------------------------------
At 11:27 am 1/26/98 -0500, you wrote:
>Ron,
>
>Would you please explain the bugs in the TS Date and Time functions? Do
>they not work correctly if you just use Date and Time without saving
>them as a variable? What happens?
>
>Thanks,
> Jim Sullivan
>===========================================================================
=====
>Ron Augustine wrote:
>>
>> You could do something like this -- LoLow and HiHigh will always have the
>> Highest High and Lowest Low for the specified time period. The Variables
>> are reset for each new day.
>> The "Tm" and "Dt" references for Date and Time are necessary due to bugs in
>> the TS Date and Time functions. You can adjust the basic logic depending on
>> what you're trying to do.
>>
>> --------------------------------------------
>> Vars: Tm(0), Dt(0), LoLow(99999), HiHigh(0);
>>
>> Tm=Time; Dt=Date;
>>
>> If Dt <> Dt[1] then Begin
>> LoLow=99999; HiHigh=0;
>> End;
>>
>> If Tm > 1014 and Tm < 1216 then Begin
>> If High > HiHigh then HiHigh = High;
>> If Low < LoLow then LoLow = Low;
>> End; <snip>
>
>
|