Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 10/27/2010(UTC) Posts: 4
|
This is my code for EMA 2 cross EMA 5 as buy signal, (Cross (Mov (CLOSE, 2, E), Mov (CLOSE, 5, E))), but the scanning result does not meet the above requirememt.Please advise me. Thank you
|
|
|
|
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)
|
here is a chart of research in motion using a 2 ema crossing over a 5 ema
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
pds1:=Input("EMA1 periods",1,260,2);
pds2:=Input("EMA2 periods",2,260,5);
Ind1:=Mov(C,pds1,E);
Ind2:=Mov(C,pds2,E);
{* Entry conditions *}
entry:=Cross(Ind1,Ind2);
{* Exit conditions *}
exit:=Cross(Ind2,Ind1);
the above chart was created with vstpro from metastocktools.com notice in the downturns you are at nearly 50% drawdowns of capital
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 11/18/2007(UTC) Posts: 96 Location: HK
|
Thank you Henry, this is a fantastic way to test systems!
|
|
|
|
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)
|
Lai,
When testing systems, the charts show a lot of whipsaws,which traders don't take into account.
The VSTPro from Metastocktools doesn't lie. There is no way to bs the results. What you put in is what you will get back. This is what Equis should have done with the enhanced system tester in the first place!
I have to praise Jose Silva for developing this add-on. It is by far the most impressive add-on that is available for the metastock user ever!
henry1224
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 10/27/2010(UTC) Posts: 4
|
Hi Henry, is this the code that can be put into "The explorer”? Please advise me. Thank you
|
|
|
|
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)
|
yes you can use the code, but change the inputs to a hard number cola could be long entry and col b the short entry or Ind1:=Mov(C,2E);
Ind2:=Mov(C,5,E);
Signal:=If(Cross(Ind1,Ind2),1,If(Cross(Ind2,Ind1),-1,0)); Signal
Signal will show +1 for entry and -1 for exit, in the filter section Col A<>0
this will eliminate all equities that do not meet the exploration
|
|
|
|
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)
|
same system traded on Dell using only the MTF trend filter from VST Pro
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 10/27/2010(UTC) Posts: 4
|
Sorry to bother you again, I’ve tried the above code, it is workable. What if I just want to show the +1 for entry only and eliminate -1 for exit? Thank you
|
|
|
|
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 formula gives you +1 for a long entry and -1 for an exit Ind1:=Mov(C,2E);
Ind2:=Mov(C,5,E);
Signal:=If(Cross(Ind1,Ind2),1,If(Cross(Ind2,Ind1),-1,0)); Signal
to show only +1 for long entries all other points will show 0
Ind1:=Mov(C,2E);
Ind2:=Mov(C,5,E);
Signal:=If(Cross(Ind1,Ind2),1,0); Signal I would use the top formula! First reason,it shows more events, second if you keep building new indicators that only show 1 event, you will run out of room in the indicator builder. The indicator builder will only allow for 2000 indicators; 1 event X 2000 indicators =2000 events, 2 event X 2000 indicators = 4000 events hope you see my point
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 10/27/2010(UTC) Posts: 4
|
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 12/11/2010(UTC) Posts: 1
|
Hello Henry Greetings of the day.
I want to use the EMA 7/ EMA15 as an trading system i am using metastock but i have no knowledge of how to write formula where to write formula and where to back test the same of the data to see its result.
I want to use the system on daily bars
My Entry condition is EMA 7 cross Ema 15 Go Long 1tick above the High of the Bar Stoploss Low the previous bar
My Short entry condition is EMA 15 cross EMA 7 go Short 1tick blow the low of the Bar stoploss High of the previous bar
Trail sl or profit taking exit will be close basis break of EMA 15 for long pos. and EMA 7 for short position
kindly help with your expertize
Mohit
|
|
|
|
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)
|
dow 7ema Xover 15ema long only
|
|
|
|
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.