Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
To plot the three lines:
FastLen:=12;
SlowLen:=26;
Length:=10;
StDv:=1;
offset:=0;
myMACD:=Mov(C,FastLen,E)-Mov(C,SlowLen,E);
Avg:=Mov(myMACD,Length,E);
BBTop:=BBandTop(myMACD,Length,E,stDv);
BBBot:=BBandBot(myMACD,Length,E,stDv);
myMACD;
BBTop;
BBBot;
To use Roy Larsens Latch function for the long and short entry and exits:
FastLen:=12;
SlowLen:=26;
Length:=10;
StDv:=1;
offset:=0;
myMACD:=Mov(C,FastLen,E)-Mov(C,SlowLen,E);
Avg:=Mov(myMACD,Length,E);
BBTop:=BBandTop(myMACD,Length,E,stDv);
BBBot:=BBandBot(myMACD,Length,E,stDv);
myMACD;
BBTop;
BBBot;
N:=myMACD>BBTop;
X:=myMACD<BBBot;
I:=Cum(N+X>-1)=1;
Tr:=BarsSince(I OR N)<BarsSince(I OR X);
Tr*HHV(myMACD,100);
{Tr>0 is LONG, Tr=0 is SHORT}
{This bit can be more easily achieved if you have the Forum.dll !}
Hope this helps. If it isnt quite right let me know.
wabbit :D
|