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

Re: Subtle Bug Realtime vs Non-Realtime



PureBytes Links

Trading Reference Links

Thanks Alex,

I guess I failed to mention that this is day session only data so the last
tick of the previous day is always 3:15 pm central or earlier and the first
tick of the day is alway 8:30 am central.  The fact that it doesnt do it
consistently makes me think it has something to do with realtime multidata
charts.  I'm hoping someone can chime in here with a good understanding of
how the easylanguage engine handles multidata charts realtime vs single data
charts realtime.


----- Original Message ----- 
From: "Alex Matulich" <alex@xxxxxxxxxxxxxx>
To: "Justin Wilson" <justinwilson@xxxxxxxxxx>
Cc: <omega-list@xxxxxxxxxx>
Sent: Monday, November 03, 2003 11:01 AM
Subject: Re: Subtle Bug Realtime vs Non-Realtime


> >I've got a bug that shows up running real-time that doesn't show when
> >applied to historical data.  The code simply plots the previous day's
High
> >and Low on the current day.
> >
> >if date <> date[1] then begin
>
> This may give you different results depending on which time zone
> you're in, because the statement will be true only after midnight --
> which is different for each time zone.  What you should do instead
> is:
>
> if time crosses over Sess1EndTime then begin
>
> Better yet, if you just want the high and low of the day session, your
> first if statement should be split up as follows.  The whole indicator
> becomes:
>
> if time crosses over Sess1EndTime then begin
>     prevDH = currentDH;
>     prevDL = currentDL;
> end;
> if time = Sess1FirstBarTime then begin
>     currentDH = H;
>     currentDL = L;
> end;
>
> if H > currentDH then currentDH = H;
> if L < currentDL then currentDL = L;
> plot1(prevDH, "prevDH");
> plot2(prevDL, "prevDL");
>
> Changing your triggers from date changes to time crossovers *might*
> fix your problem.  I use something similar to this and it works fine
> for me.
>
> -- 
>   ,|___    Alex Matulich -- alex@xxxxxxxxxxxxxx
>  // +__>   Director of Research and Development
>  //  \
>  // __)    Unicorn Research Corporation -- http://unicorn.us.com
>
>