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

Notification

Icon
Error

Options
Go to last post Go to first unread
ski3r  
#1 Posted : Sunday, March 6, 2016 7:54:16 AM(UTC)
ski3r

Rank: Newbie

Groups: Registered Users, Subscribers, Unverified Users
Joined: 3/5/2016(UTC)
Posts: 2

Hi!

I'm trying to create an exploration of a custom indicator (T3) where the 8 period cross the 3 period T3. How do I set the inputs in the formula?

cross(Fml( "T3 Moving Average"), Fml( "T3 Moving Average"))

I have created the T3 indicator like this:

Periods:=Input("Time Periods:",1,63,5);

a:=Input("Hot:",0,2,.7);
e1:=Mov(P,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;
c1*e6+c2*e5+c3*e4+c4*e3;

mstt  
#2 Posted : Sunday, March 6, 2016 7:49:40 PM(UTC)
mstt

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
ski3r  
#3 Posted : Monday, March 7, 2016 5:42:37 PM(UTC)
ski3r

Rank: Newbie

Groups: Registered Users, Subscribers, Unverified Users
Joined: 3/5/2016(UTC)
Posts: 2

Thanks, I think I got it right now!
Users browsing this topic
Guest (Hidden)
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.