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

Re: Fwd: Time of the day



PureBytes Links

Trading Reference Links


	Good post, Hans.  My one suggestion is to avoid hard coding the times.  I
use the built in functions to accomplish the same thing:

Instead of "if time > 1000 and time < 1600 then begin"

I recommend :

  if  (Time  > AddTime (Sess1StartTime, +30) and
      (Time <  AddTime   (Sess1EndTime, -15) 
  then begin
  {  }
  end ;

My clients would, of course, use :

  if  (Time  > vrt.AddTime (Sess1StartTime, +30) and
      (Time <  vrt.AddTime   (Sess1EndTime, -15) 
  then begin
  {  }
  end ;

At 09:04 AM 03/11/99 , you wrote:
>
>german greetings via the list
>
>your problem is that you set the TRIGGER valid on one day and dont reverse
it on the close of the day - so its STILL valid next day and triggers to
early as per your other post you found one solution:
>
>"If time > Zeit+BarInterval and time < EndZeit - BarInterval then begin"
>
>but carefull, as that will NOT trigger during last bar of the day - if
thats intended ok
>
>you might like to try simply:
>
>if time > 1000 and time < 1600 then begin
>
>e.g. that will not trade the first half hour and the last 15 minutes of
S&P futures
>
>rgds hans
>around the corner :-)
>
>> If I use the following EL code ("If date>date[1] then Zeit = time;"), I
get exactly what i want in the print log - the time of the first bar of the
day. Since I do not want my system to take the signals on the first bar i
add the following line ("If time > Zeit+BarInterval then begin").
>> 
>> Well, the system is taking the signals on the first bar of the day!
>> Any ideas?
>> Volker
>> 
>> Vars: Zeit(0);
>> If date>date[1] then Zeit = time;
>> If time > Zeit+BarInterval then begin
>> 
>

    Samuel K. Tennis                              Vista Research
    129 Staff Drive                       voice: 1(850) 243-5105
    Ft. Walton Beach, FL  32548             fax: 1(850) 301-2884
    skt@xxxxxxxxxxxxxxxxxx        http://www.vista-research.com/
             ***** EasyLanguage Spoken Here *****