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

help on el code for intraday range



PureBytes Links

Trading Reference Links

i need some help on some simple el code.  i want to measure the intraday 
range for the near 24/7 currency futures during the us hi-volume market 
only, after 5:20 am [pdt].  the following code verifies, but does not 
calculate what i want.

can anybody find the mistake(s)?

thanx in advance,
brad yoneoka

functions:
(1)  _IDhighCur_

vars:htoday(0);
htoday=htoday[1];
if date>date[1] and time>0519 then htoday=0;
if h>htoday then htoday=h;
IDhighcur=htoday;

(2)  _ IDlowCur

_vars:lowtoday(99999);
lowtoday=lowtoday[1];
if date>date[1] and time>0519 then lowtoday=99999;
if l<lowtoday then lowtoday=l;
IDlowcur=lowtoday;_

_indicator:

(3)   _IDRangeCurrency_

{    Put Data1 = IntraDay;
   Put Data2 = Daily.        }

vars: IDRangeCur(0);

IDRangeCur = IDHighCur of Data1 - IDLowCur of Data1;
Plot1(IDRangeCur, "IDrangeCur");
Plot2(AvDaRange, "AvDaRange");

Condition1 = FALSE ;
Condition1 = IDRangeCur=AvDaRange;

if Condition1 then
   Alert( "" ) ;