Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 9/13/2004(UTC) Posts: 673 Location: Salt Lake City, UT
|
If you are wanting to use 3-10-16 in place of 12-26-9, you can write it as follows;
Pds1:=3; Pds2:=10; Pds3:=16; Mov(C,Pds1,E) - Mov(C,Pds2,E);{MACD} Mov(Mov(C,Pds1,E) - Mov(C,Pds2,E),Pds3,E){Signal Line}
Now if you wanted to make a set of trading rules such as when MACD Crosses above or below its signal line you can modify the above formula slightly:
{Buy} Pds1:=3;
Pds2:=10;
Pds3:=16; X:=Mov(C,Pds1,E) - Mov(C,Pds2,E);{MACD} Y:=Mov(Mov(C,Pds1,E) - Mov(C,Pds2,E),Pds3,E);{Signal Line} Cross(X,Y)
{Sell}
Pds1:=3;
Pds2:=10;
Pds3:=16;
X:=Mov(C,Pds1,E) - Mov(C,Pds2,E);{MACD}
Y:=Mov(Mov(C,Pds1,E) - Mov(C,Pds2,E),Pds3,E);{Signal Line}
Cross(Y,X)
|