Hi friends
can anyone help me get the afl coding for this metastock code please!
I tried but found a thing called PREVIOUS and got stuck there.
original version of ms code here
thanks in advance
can anyone help me get the afl coding for this metastock code please!
I tried but found a thing called PREVIOUS and got stuck there.
HTML:
//Presto's Magic Box afl (i tried- still incomplete)
//(a tweaked Version of the Darvis Box)
Periods=Param("periods",1,260,100);
Topbox=IIf(Ref(H,-3)>=Ref(HHV(H,Periods),-4) AND Ref(H,-2)<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND H< Ref(H,-3),Ref(H,-3),PREVIOUS);
Botbox=IIf(Ref(H,-3)>=Ref(HHV(H,Periods),-4) AND Ref(H,-2)<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND H< Ref(H,-3),LLV(L,4),PREVIOUS);
Plot(Botbox,"botbox",colorRed,styleDashed);
Plot(Topbox,"Topbox",colorBlue,styleDashed);
Plot(C,"c",colorBlack,styleBar);
HTML:
Presto's Magic Box
(a tweaked version of the Darvis Box)
Periods:=Input("periods",1,260,100);
Topbox:=If(Ref(H,-3)>=Ref(HHV(H,Periods),-4) AND Ref(H,-2)<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND H< Ref(H,-3),Ref(H,-3),PREVIOUS);
Botbox:=If(Ref(H,-3)>=Ref(HHV(H,Periods),-4) AND Ref(H,-2)<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND H< Ref(H,-3),LLV(L,4),PREVIOUS);
Botbox;
Topbox;