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

Re: [amibroker] Re: Weekly Data



PureBytes Links

Trading Reference Links

Steph;

Thanks, I will work with this.

Steve

At 05:18 PM 6/2/01 +0000, you wrote:

Steve,

can't we use the codes we have done In ms ??
do you rememnber the weekly Bars for daily data?
Now must be possible to write them with Vb

Steph

{Weekly Bars}
B:=DayOfWeek();
G:=BarsSince(B<Ref(B,-1));

Hw:=If(B<Ref(B,-1),ExtFml( "VarPeriod.HhvVar",Ref(H,-1) ,Ref(G,-1)
+1),PREV);
Lw:=If(B<Ref(B,-1),ExtFml( "VarPeriod.LlvVar",Ref(L,-1) ,Ref(G,-1)
+1),PREV);
Cw:=If(B<Ref(B,-1),Ref(CLOSE,-1),PREV);
Ow:=If(B<Ref(B,-1),ValueWhen(2,B<Ref(B,-1),OPEN),PREV);
{Tp:= LastValue(PeakBars(1,G,1));
Cw:=ExtFml( "VarPeriod.RefVar",Cw ,Tp);
Ow:=ExtFml( "VarPeriod.RefVar",Ow ,Tp);
Lw:=ExtFml( "VarPeriod.RefVar",Lw ,Tp);
Hw:=ExtFml( "VarPeriod.RefVar",Hw ,Tp);}
cw
>
> Has anyone coded a sequence that turns daily data into a weekly
data
> set?
>
> Thanks
>