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

Notification

Icon
Error

Options
Go to last post Go to first unread
aaapittsburgh  
#1 Posted : Friday, March 11, 2005 5:18:35 AM(UTC)
aaapittsburgh

Rank: Newbie

Groups: Registered, Registered Users
Joined: 3/11/2005(UTC)
Posts: 7

I'm new to Metastock and I was wondering if anyone could help me code an indicator that I'm trying to create. The indicator uses two seperate moving averages, a T3 MA and a T5 MA. T3: e1:=Mov(C,3,E); e2:=Mov(e1,3,E); e3:=Mov(e2,3,E); e4:=Mov(e3,3,E); e5:=Mov(e4,3,E); e6:=Mov(e5,3,E); c1:=-.618*.618*.618; c2:=3*.618*.618+3*.618*.618*.618; c3:=-6*.618*.618-3*.618-3*.618*.618*.618; c4:=1+3*.618+.618*.618*.618+3*.618*.618; c1*e6+c2*e5+c3*e4+c4*e3; T5: e1:=Mov(C,5,E); e2:=Mov(e1,5,E); e3:=Mov(e2,5,E); e4:=Mov(e3,5,E); e5:=Mov(e4,5,E); e6:=Mov(e5,5,E); c1:=-.618*.618*.618; c2:=3*.618*.618+3*.618*.618*.618; c3:=-6*.618*.618-3*.618-3*.618*.618*.618; c4:=1+3*.618+.618*.618*.618+3*.618*.618; c1*e6+c2*e5+c3*e4+c4*e3; What I'm trying to do is subtract the T5 from the T3, which will calculate the difference between the averages, and create a type of momentum oscillator. Any help on this would be greatly appreciated.
hayseed  
#2 Posted : Saturday, March 12, 2005 5:10:51 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey pittsburgh..... just a thought here....you possibly could set up t3 and t5 as formulas.... then just use those 2 formulas to create the third "pittsburgh momentum oscillator" indicator..... tried on several stocks and indexes,..... very interesting, though it took abit to figure out how it moved....... seldom did it give a false signal.... going to toy around with a little more myself, 10 and 20 ma perhaps ......h
name:pittsburgh t3 formula: e1:=Mov(C,3,E); e2:=Mov(e1,3,E); e3:=Mov(e2,3,E); e4:=Mov(e3,3,E); e5:=Mov(e4,3,E); e6:=Mov(e5,3,E); c1:=-.618*.618*.618; c2:=3*.618*.618+3*.618*.618*.618; c3:=-6*.618*.618-3*.618-3*.618*.618*.618; c4:=1+3*.618+.618*.618*.618+3*.618*.618; c1*e6+c2*e5+c3*e4+c4*e3;

name:pittsburgh t5 formula: e1:=Mov(C,5,E); e2:=Mov(e1,5,E); e3:=Mov(e2,5,E); e4:=Mov(e3,5,E); e5:=Mov(e4,5,E); e6:=Mov(e5,5,E); c1:=-.618*.618*.618; c2:=3*.618*.618+3*.618*.618*.618; c3:=-6*.618*.618-3*.618-3*.618*.618*.618; c4:=1+3*.618+.618*.618*.618+3*.618*.618; c1*e6+c2*e5+c3*e4+c4*e3;

name:pittsburgh momentum oscillator formula: Fml("pittsburgh t3") - Fml("pittsburgh t5") ---------------------------------------------------------
henry1224  
#3 Posted : Saturday, March 26, 2005 4:23:18 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
using the OHLC/4 instead of close Highlights long A1:=(O+H+L+C)/4; e1:=Mov(A1,3,E); e2:=Mov(e1,3,E); e3:=Mov(e2,3,E); e4:=Mov(e3,3,E); e5:=Mov(e4,3,E); e6:=Mov(e5,3,E); e1a:=Mov(A1,5,E); e2a:=Mov(e1a,5,E); e3a:=Mov(e2a,5,E); e4a:=Mov(e3a,5,E); e5a:=Mov(e4a,5,E); e6a:=Mov(e5a,5,E); c1:=-.618*.618*.618; c2:=3*.618*.618+3*.618*.618*.618; c3:=-6*.618*.618-3*.618-3*.618*.618*.618; c4:=1+3*.618+.618*.618*.618+3*.618*.618; T5:=c1*e6a+c2*e5a+c3*e4a+c4*e3a; T3:=c1*e6+c2*e5+c3*e4+c4*e3; T3>T5 Short A1:=(O+H+L+C)/4; e1:=Mov(A1,3,E); e2:=Mov(e1,3,E); e3:=Mov(e2,3,E); e4:=Mov(e3,3,E); e5:=Mov(e4,3,E); e6:=Mov(e5,3,E); e1a:=Mov(A1,5,E); e2a:=Mov(e1a,5,E); e3a:=Mov(e2a,5,E); e4a:=Mov(e3a,5,E); e5a:=Mov(e4a,5,E); e6a:=Mov(e5a,5,E); c1:=-.618*.618*.618; c2:=3*.618*.618+3*.618*.618*.618; c3:=-6*.618*.618-3*.618-3*.618*.618*.618; c4:=1+3*.618+.618*.618*.618+3*.618*.618; T5:=c1*e6a+c2*e5a+c3*e4a+c4*e3a; T3:=c1*e6+c2*e5+c3*e4+c4*e3; T3<T5 Symbol tab long Entry A1:=(O+H+L+C)/4; e1:=Mov(A1,3,E); e2:=Mov(e1,3,E); e3:=Mov(e2,3,E); e4:=Mov(e3,3,E); e5:=Mov(e4,3,E); e6:=Mov(e5,3,E); e1a:=Mov(A1,5,E); e2a:=Mov(e1a,5,E); e3a:=Mov(e2a,5,E); e4a:=Mov(e3a,5,E); e5a:=Mov(e4a,5,E); e6a:=Mov(e5a,5,E); c1:=-.618*.618*.618; c2:=3*.618*.618+3*.618*.618*.618; c3:=-6*.618*.618-3*.618-3*.618*.618*.618; c4:=1+3*.618+.618*.618*.618+3*.618*.618; T5:=c1*e6a+c2*e5a+c3*e4a+c4*e3a; T3:=c1*e6+c2*e5+c3*e4+c4*e3; T3>T5 AND Ref(T3,-1)<Ref(T5,-1) Short Entry A1:=(O+H+L+C)/4; e1:=Mov(A1,3,E); e2:=Mov(e1,3,E); e3:=Mov(e2,3,E); e4:=Mov(e3,3,E); e5:=Mov(e4,3,E); e6:=Mov(e5,3,E); e1a:=Mov(A1,5,E); e2a:=Mov(e1a,5,E); e3a:=Mov(e2a,5,E); e4a:=Mov(e3a,5,E); e5a:=Mov(e4a,5,E); e6a:=Mov(e5a,5,E); c1:=-.618*.618*.618; c2:=3*.618*.618+3*.618*.618*.618; c3:=-6*.618*.618-3*.618-3*.618*.618*.618; c4:=1+3*.618+.618*.618*.618+3*.618*.618; T5:=c1*e6a+c2*e5a+c3*e4a+c4*e3a; T3:=c1*e6+c2*e5+c3*e4+c4*e3; T3<T5 AND Ref(T3,-1)>Ref(T5,-1) This expert looks nice but is too whippy, needs a trend filter to avoid whipsaws
henry1224  
#4 Posted : Saturday, March 26, 2005 9:09:15 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
This indicator plots both the T3 and T5 on a chart. I have made an input feature to allow you to choose what value you want the T3 and T5 to smooth A:=Input("1=P 2=O 3=H 4=L 5=C 6=MP 7=TYP 8=OHLC",1,8,5); A1:=If(A=1,P,If(A=2,O,If(A=3,H,If(A=4,L,If(A=5,C,If(A=6,MP(),If(A=7,Typical(),(O+H+L+C)/4))))))); e1:=Mov(A1,3,E); e2:=Mov(e1,3,E); e3:=Mov(e2,3,E); e4:=Mov(e3,3,E); e5:=Mov(e4,3,E); e6:=Mov(e5,3,E); e1a:=Mov(A1,5,E); e2a:=Mov(e1a,5,E); e3a:=Mov(e2a,5,E); e4a:=Mov(e3a,5,E); e5a:=Mov(e4a,5,E); e6a:=Mov(e5a,5,E); c1:=-.618*.618*.618; c2:=3*.618*.618+3*.618*.618*.618; c3:=-6*.618*.618-3*.618-3*.618*.618*.618; c4:=1+3*.618+.618*.618*.618+3*.618*.618; T5:=c1*e6a+c2*e5a+c3*e4a+c4*e3a; T3:=c1*e6+c2*e5+c3*e4+c4*e3; T3;T5;
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.