Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi ski3r
Probably the first thing you should do is change the "e1" variable to Mov(C,Periods,E). An indicator will use CLOSE as the default value for "P" if no plot is marked. An exploration, however, cannot select the P variable for all securities in a scan.
Create two additional copies of the "T3 Moving Average" indicator and name them "T3 Moving Average 3" and "T3 Moving Average 8". Then set the default value of the "Periods" Input() function to 3 and 8 respectively. Your exploration code should then look like this.
{ColA:}
Cross(Fml( "T3 Moving Average 8"), Fml( "T3 Moving Average 3"));
Another way to solve the problem is to copy the indicator into Column A twice and then modify the T3 code as below.
Periods:=3;
a:=0.7;
e1:=Mov(C,Periods,E);
e2:=Mov(e1,Periods,E);
e3:=Mov(e2,Periods,E);
e4:=Mov(e3,Periods,E);
e5:=Mov(e4,Periods,E);
e6:=Mov(e5,Periods,E);
c1:=-a*a*a;
c2:=3*a*a+3*a*a*a;
c3:=-6*a*a-3*a-3*a*a*a;
c4:=1+3*a+a*a*a+3*a*a;
T3:=c1*e6+c2*e5+c3*e4+c4*e3;
Periods8:=8;
a:=0.7;
e1:=Mov(C,Periods,E);
e2:=Mov(e1,Periods,E);
e3:=Mov(e2,Periods,E);
e4:=Mov(e3,Periods,E);
e5:=Mov(e4,Periods,E);
e6:=Mov(e5,Periods,E);
c1:=-a*a*a;
c2:=3*a*a+3*a*a*a;
c3:=-6*a*a-3*a-3*a*a*a;
c4:=1+3*a+a*a*a+3*a*a;
T8:=c1*e6+c2*e5+c3*e4+c4*e3;
Cross(T8,T3);
If your exploration fails to list any securities, one way to check that the exploration is functioning properly is to change the Cross(T8,T3) result to include the Cum() function, Cross(Cross(T8,T3)), so that you get a cumulative result for a certain amount of history rather than just the current data bar result.
Hope this helps.
Roy
|