Fernando,
You need to call the Dr variable, like this:
day:=DayOfMonth( )<>Ref(DayOfMont h(),-1);
Dh:=HighestSince( 1,day,H);
Dl:=LowestSince( 1,day,L);
Dr:=Dh-Dl;
dr;
Not sur why you need all the code though
H-L;
will do the same thing.
Preston
--- In equismetastock@ yahoogroups. com, "Fernando Santos"
<ptc_man3@xx .> wrote:
>
> Hi.
>
> I'm having problems with the following formula:
>
> day:=dayofmonth( )<>ref(dayofmont h(),-1);
> Dh:=highestsince( 1,day,h);
> Dl:=lowestsince( 1,day,l);
> Dr:=Dh-Dl;
>
> How can I make an "n" days average of the daily range with this
formula?
>
> I'm not even being able to call the previous daily range using
>
valuewhen(2, day,dr).
>
> Where's the problem?
>
> Regards,
> Fernando
>