logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
KTP2  
#1 Posted : Tuesday, May 11, 2010 1:47:37 PM(UTC)
KTP2

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 2/2/2007(UTC)
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

M. H. Pee's article, "Trend Trigger Factor," introduces an indicator of the same name. The formula for this indicator and the steps to include it into MetaStock are below:

To enter this indicator into MetaStock:

    <li>In the Tools menu, select Indicator Builder. <li>Click New to open the Indicator Editor for a new indicator. <li>Type the name of the formula. <li>Click in the larger window and type in the following formula.

Name: Trend Trigger Factor

Formula:

x:=Input("number of periods",2,100,15);
bp:=HHV(H,x)-Ref(LLV(L,x),-x);
sp:=Ref(HHV(H,x),-x)-LLV(L,x);
((bp-sp)/(0.5*(bp+sp)))*100

As Mr. Pee's article also included the signals to trade this indicator, it is possible to construct a system test and an expert advisor for it. These formulas and the procedure for creating them follow.

To create the system test:

    <li>In the Tools menu, select the Enhanced System Tester <li>Click New to open the system tester editor <li>Select the Buy Order tab and insert this formula:
    x:=15;
    bp:=HHV(H,x)-Ref(LLV(L,x),-x);
    sp:=Ref(HHV(H,x),-x)-LLV(L,x);
    ttf:=((bp-sp)/(0.5*(bp+sp)))*100;
    Cross(ttf,100)
    <li>Select the Sell Order tab and insert this formula:
    x:=15;
    bp:=HHV(H,x)-Ref(LLV(L,x),-x);
    sp:=Ref(HHV(H,x),-x)-LLV(L,x);
    ttf:=((bp-sp)/(0.5*(bp+sp)))*100;
    Cross(-100,ttf)
    <li>Select the Sell Short Order tab and insert this formula:
    x:=15;
    bp:=HHV(H,x)-Ref(LLV(L,x),-x);
    sp:=Ref(HHV(H,x),-x)-LLV(L,x);
    ttf:=((bp-sp)/(0.5*(bp+sp)))*100;
    Cross(-100,ttf)
    <li>Select the Buy to Cover Order tab and insert this formula:
    x:=15;
    bp:=HHV(H,x)-Ref(LLV(L,x),-x);
    sp:=Ref(HHV(H,x),-x)-LLV(L,x);
    ttf:=((bp-sp)/(0.5*(bp+sp)))*100;
    Cross(ttf,100)

Click Ok to close the editor.

To create the expert advisor:

    <li>In the Tools menu, select the Expert Advisor <li>Click New to open the expert editor <li>Select the Highlights tab <li>Click New to make a new highlight <li>Enter the name as: Long <li>Set the color to Green <li>Enter the following formula for the condition:
    x:=15;
    bp:=HHV(H,x)-Ref(LLV(L,x),-x);
    sp:=Ref(HHV(H,x),-x)-LLV(L,x);
    ttf:=((bp-sp)/(0.5*(bp+sp)))*100;
    ttf>100
    <li>Click ok to close the highlight editor <li>Repeat steps 4-8 to make the short highlight listed below

    Name: Short

    Color: Red

    Condition:

    x:=15;
    bp:=HHV(H,x)-Ref(LLV(L,x),-x);
    sp:=Ref(HHV(H,x),-x)-LLV(L,x);
    ttf:=((bp-sp)/(0.5*(bp+sp)))*100;
    ttf<-100
    <li>Select the Symbols tab <li>Click New to make a new symbol <li>Enter the name as Buy <li>Enter the following formula for the condition:
    x:=15;
    bp:=HHV(H,x)-Ref(LLV(L,x),-x);
    sp:=Ref(HHV(H,x),-x)-LLV(L,x);
    ttf:=((bp-sp)/(0.5*(bp+sp)))*100;
    Cross(ttf,100)
    <li>Select the Graphics tab <li>Set the symbol to the up arrow and the color to green <li>Click Ok to close the symbol editor <li>Repeat steps 11-16 to make the sell symbol listed below

    Name: Sell

    Condition:

    x:=15;
    bp:=HHV(H,x)-Ref(LLV(L,x),-x);
    sp:=Ref(HHV(H,x),-x)-LLV(L,x);
    ttf:=((bp-sp)/(0.5*(bp+sp)))*100;
    Cross(-100,ttf)

    Symbol: Sell Arrow

    Color: Red

    <li>Click OK to close the expert editor

William Golson
Equis International

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.