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

[EquisMetaStock Group] Re: TrendScore



PureBytes Links

Trading Reference Links


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



--- In equismetastock@xxxxxxxxxxxxxxx, "Panagiotes. E. Savvides" 
<psavi@xxxx> wrote:
> 
> In Stock & Commgities V. 11:9 (382-386):Rating Trend Strenth by
> Tushar S. Chande I found the Metastock Formula 
> --------------------------------------
> TrendScore:=
> (If(C>=Ref(C,-11),1,-1)+
> If(C>=Ref(C,-12),1,-1)+
> If(C>=Ref(C,-13),1,-1)+
> If(C>=Ref(C,-14),1,-1)+
> If(C>=Ref(C,-15),1,-1)+
> If(C>=Ref(C,-16),1,-1)+
> If(C>=Ref(C,-17),1,-1)+
> If(C>=Ref(C,-18),1,-1)+
> If(C>=Ref(C,-19),1,-1)+
> If(C>=Ref(C,-20),1,-1));
> TrendScore;
> 0
> -----------------------------------
> If it is posible the code for the formula If
> 
> A) The starting day (in the above example  x=10) is a variable (in
> exam Input.... (5,100,10)) and
> B) The Range days (in the above example  y=10 Days) is also a
> variable (in exam Input....(5,100,10)) 
> 
> Thanks





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/