Try this
periods:=Input("periods",1,100,8);
A:=Sum((If(H>Ref(C,-1),H-Ref(C,-1),0)),periods);
B:=Sum(C-L,periods);
D:=Sum(If(Ref(C,-1)>L,Ref(C,-1)-L,0),periods);
F:=Sum(H-C,periods);
(A+B)/(A+B+F+D)
Just copy and paste.
Punctuation in Metastock is very specific.
Preston
--- In [email protected], "sourav" <sournila@...> wrote:
>
> I have coded De Marker 2 in the Indicator builder thus:-
>
> periods:=Input("periods",1,100,8);
>
> A:=Sum((If(H>Ref(C,-1),H-Ref(C,-1),0)),periods);
>
> B:=Sum(C-L,periods)
>
> D:= Sum( If Ref(C,-1)>L,Ref(C,-1)-L,0)),periods);
> F:=Sum(H-C,periods)
>
> (A+B)/(A+B+F+D)
>
> This gives Debugging errors
>
> Even if I write the full form of the variables individually without declaring
> variables---I still get Debugging errors.
>
> Can anybody help?
>