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)
|
If you don't have the time to read the manual or user guide, then I would suggest that you not trade with Metastock as for your code, you gave a long condition, now create a short condition, then use use the if functions to create a system Code: A:=If( C>Mov(C,50,E)
AND ROC(C ,30 ,% ) >0
AND ROC(C,65,%)>0,1,
If(C<Mov(C,50,E)
AND ROC(C ,30 ,% ) <0
AND ROC(C,65,%)<0,-1,0));
A;
when plotted on a chart you will see that the indicator PLOTS 1 when LONG and -! when SHORT now in the Expert under the highlight tab click new , name it long Code:
A:=If( C>Mov(C,50,E)
AND ROC(C ,30 ,% ) >0
AND ROC(C,65,%)>0,1,
If(C<Mov(C,50,E)
AND ROC(C ,30 ,% ) <0
AND ROC(C,65,%)<0,-1,0));
A=1
click new name it short Code:A:=If( C>Mov(C,50,E)
AND ROC(C ,30 ,% ) >0
AND ROC(C,65,%)>0,1,
If(C<Mov(C,50,E)
AND ROC(C ,30 ,% ) <0
AND ROC(C,65,%)<0,-1,0));
A=-1
Now under the symbol tab create a new symbol name it buy Code:A:=If( C>Mov(C,50,E)
AND ROC(C ,30 ,% ) >0
AND ROC(C,65,%)>0,1,
If(C<Mov(C,50,E)
AND ROC(C ,30 ,% ) <0
AND ROC(C,65,%)<0,-1,0));
A=1 and Ref(A,-1)<>1
create a new symbol name it sell Code:A:=If( C>Mov(C,50,E)
AND ROC(C ,30 ,% ) >0
AND ROC(C,65,%)>0,1,
If(C<Mov(C,50,E)
AND ROC(C ,30 ,% ) <0
AND ROC(C,65,%)<0,-1,0));
A=-1 and Ref(A,-1)<>-1
I will not test the system for you, that I will expect you to validate the risk reward ratios for your acceptable levels
|