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

[Metastockusers] Re: TREND CONTINUATION FACTOR



PureBytes Links

Trading Reference Links


I never found these to be of much use. But M.H. likes them, I guess.

 +TCF

pc:=If(ROC(C,1,$)>0,ROC(C,1,$),0);
nc:=If(ROC(C,1,$)<0,Neg(ROC(C,1,$)),0);
ncf:=If(nc=0,0,PREV+nc);
Sum(pc,35)-Sum(ncf,35)

 -TCF

pc:=If(ROC(C,1,$)>0,ROC(C,1,$),0);
nc:=If(ROC(C,1,$)<0,Neg(ROC(C,1,$)),0);
pcf:=If(pc=0,0,PREV+pc);
Sum(nc,35)-Sum(pcf,35)

 Position

pc:=If(ROC(C,1,$)>0,ROC(C,1,$),0);
nc:=If(ROC(C,1,$)<0,Neg(ROC(C,1,$)),0);
pcf:=If(pc=0,0,PREV+pc);
ncf:=If(nc=0,0,PREV+nc);
ptcf:=Sum(pc,35)-Sum(ncf,35);
ntcf:=Sum(nc,35)-Sum(pcf,35);
If(ptcf>0,1, If(ntcf>0,-1, PREV));


You might as well get all of Pee's gold.

 Trend Detection Index

x:=Input("number of periods", 5,50,20);
am:= Abs(C-Ref(C,-(x-1)));
td:= Sum(C-Ref(C,-(x-1)),x);
tdi:= (Abs(td)+Sum(am,x))-Sum(am,(2*x));
status:= If(tdi>0, If(td>0,1,-1), PREV);
tdi;
td;
status*LastValue(Highest(Max(Abs(tdi),Abs(td))))

 Trend Intensity Index

x:=Input("number of periods", 5,100,30);
ma:=Mov(C,2*x,S);
sdp:=Sum(If(C-ma>0, C-ma,0),x);
sdm:=Sum(If(ma-C>0, ma-C,0),x);
(sdp/(sdp + sdm)) * 100



--- In Metastockusers@xxxxxxxxxxxxxxx, "CRAIG D. HANSELL" <mrcdh@xxxx>
wrote:
> 
> In the Bonus Issue 2005 there is an article "Trend Continuation 
> Factor".  Has anyone done the Metastock code for this so that one 
> can use it as an indicator (+1 to trade; -1 short position; or 0 no 
> trade; or exploration; or expert; or system test.  Thanks in advance 
> for sharing the above if you have done same.....





------------------------ 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/zMEolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

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

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