Ok , there was a syntax error in my previous mail so try this one FirstBarofDay = DateNum() != Ref(DateNum(), -1); HToday = HighestSince( FirstBarofDay, H); LToday = LowestSince(FirstBarofDay, L);
Plot( HToday, "Ht", colorRed ); Plot (LToday, "Lt", colorYellow); _____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Angelo Sent: Friday, 4 July 2008 10:10 PM To: [email protected] Subject: [amibroker] Re: Tracking intraday High & Low --- In [EMAIL PROTECTED] <mailto:amibroker%40yahoogroups.com> ps.com, "Paul Ho" <[EMAIL PROTECTED]> wrote: > > try highestssince(datenum() != ref(datenum(), -1) for high and the opposite > for low > > > _____ > Thanks Paul, I'll give it a try. The following was my attempt of coding, maybe someone will be able to explain what was wrong: ============================================================ FirstBarofDay = DateNum() != Ref(DateNum(), -1); HToday =0; LToday =0; HToday = IIf(FirstBarofDay, H, Max(H, Ref(HToday, -1))); LToday = IIf(FirstBarofDay, L, Min(L, Ref(LToday, -1))); Plot( HToday, "Ht", colorRed ); Plot (LToday, "Lt", colorYellow);
