Try
this:
---8<------------------
pds:=Input("Starting
day",1,130,11);
TrendScore:=
If(C>=Ref(C,-pds),1,-1)+
If(C>=Ref(C,-(pds+1)),1,-1)+
If(C>=Ref(C,-(pds+2)),1,-1)+
If(C>=Ref(C,-(pds+3)),1,-1)+
If(C>=Ref(C,-(pds+4)),1,-1)+
If(C>=Ref(C,-(pds+5)),1,-1)+
If(C>=Ref(C,-(pds+6)),1,-1)+
If(C>=Ref(C,-(pds+7)),1,-1)+
If(C>=Ref(C,-(pds+8)),1,-1)+
If(C>=Ref(C,-(pds+9)),1,-1);
0;TrendScore
---8<------------------
You
may also want to try something simpler, but perhaps just as
effective:
---8<------------------
pds:=Input("SMA
periods",1,260,10);
Mov(If(C>=Ref(C,-pds),1,-1),pds,S)*10
---8<------------------
jose
'-)
http://www.metastocktools.com