Help
  #1 (permalink)  
Old 11-28-2005, 04:51 PM
Freshman
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Toddr is on a distinguished road
Default Help

I am trying to build an EA for MT3 in ZeroCode and need some assistance. I am building an advisor that puts in a trade when the 3 EMAs cross and exit when the 3 EMAs cross in the opposite direction or hit the stoploss, whichever comes First. Below is what my imputs are in ZeroCode except the exit on the crossover. Can someone help me whith this to program this as a reliable advisor:

BUY LOGISTICS
AND MA (1) Current > MA (2) Current
AND MA (2) Current > MA (3) Current

SELL LOGISTICS
AND MA (1) Current < MA (2) Current
AND MA (2) Current < MA (3) Current

Thank you

Todd
Reply With Quote
  #2 (permalink)  
Old 11-28-2005, 05:40 PM
Freshman
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Toddr is on a distinguished road
Default

The expert put me into the USD/CHF when the 3 EMAs were not crossed.
Reply With Quote
  #3 (permalink)  
Old 11-28-2005, 10:03 PM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,922
Thanks: 97
Thanked 361 Times in 147 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

Please clarify with screenshots. I'm not sure how exactly you think about 3 ema cross and 3 ema cross in opposite direction.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #4 (permalink)  
Old 11-29-2005, 12:58 AM
Freshman
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Toddr is on a distinguished road
Default

I have gone down to 2 moving averages, but it puts me in the wrong way or not at all. (attached)

Buy logics:

MA (1) Previous < MA (2) Previous
AND MA (1) Current > MA (2) Current

Sell logics:

MA (1) Previous > MA (2) Previous
AND MA (1) Current < MA (2) Current

Also I want it to exit the trade when the moving averages cross in the opposite direction. or when the take profit or trailing stop is hit, whichever comes first.

Thanks
Reply With Quote
  #5 (permalink)  
Old 11-29-2005, 01:01 AM
Freshman
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Toddr is on a distinguished road
Default

the file type is only allowing 58kb but you will not be able to see it clearly. So I have attached the advisor.
Attached Files
File Type: mql 4-25 current previous.mql (4.6 KB, 15 views)
Sponsored Links Best Forex Systems
Proven forex trading systems for auto trading.
See the real trading records yourself.
Reply With Quote
  #6 (permalink)  
Old 11-29-2005, 01:22 AM
Freshman
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Toddr is on a distinguished road
Default

finally figured it out
Attached Images
File Type: jpg eur.jpg (52.1 KB, 20 views)
File Type: jpg gbp.jpg (60.2 KB, 21 views)
File Type: jpg chf.jpg (54.5 KB, 16 views)
File Type: jpg journal.jpg (32.3 KB, 17 views)
Reply With Quote
  #7 (permalink)  
Old 11-29-2005, 01:28 AM
Freshman
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Toddr is on a distinguished road
Default

Let me know what the problem is because I have 2 other advisors to build. And I will be willing to upload them for you and others to use.
Reply With Quote
  #8 (permalink)  
Old 11-29-2005, 03:36 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,922
Thanks: 97
Thanked 361 Times in 147 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

Quote:
Originally Posted by Toddr
I have gone down to 2 moving averages, but it puts me in the wrong way or not at all. (attached)

Buy logics:

MA (1) Previous < MA (2) Previous
AND MA (1) Current > MA (2) Current

Sell logics:

MA (1) Previous > MA (2) Previous
AND MA (1) Current < MA (2) Current
The logics are ok. It should be working now. The mql you attached was not generated from above logics. The logics in the attached mql are opposite what you write here, so put above logics again, compile it to mql file, and overwrite the old expert file (or delete the old one first before copy the newly compiled mql).
Quote:
Originally Posted by Toddr
Also I want it to exit the trade when the moving averages cross in the opposite direction. or when the take profit or trailing stop is hit, whichever comes first.

Thanks
No need to do anything. Opposite trade is automatically closed before entering a new trade. If SL/TP is hit then the broker will close the trade for you automatically too.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #9 (permalink)  
Old 11-29-2005, 04:34 AM
Freshman
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Toddr is on a distinguished road
Default

I will try putting the proper logic in. Thanks for the quick responce.

As for the exit I am talking about exiting when the moving averages cross in the opposite direction (prevents whipsaws). Then putting me immediately into a trade in that direction. I have attached an example, and I hope that it explaines it clearly.
Attached Images
File Type: gif ScreenHunter_3.gif (50.3 KB, 19 views)
Reply With Quote
  #10 (permalink)  
Old 11-29-2005, 07:31 AM
Cartoon's Avatar
Super Moderator
 
Join Date: Aug 2004
Posts: 165
Thanks: 0
Thanked 1 Time in 1 Post
Cartoon is a name known to allCartoon is a name known to allCartoon is a name known to allCartoon is a name known to allCartoon is a name known to allCartoon is a name known to all
Talking

Toddr ,your trading style will bring you alot of money only when the market is really active:sweatdrop , but it can also kill you when the market is sideway . If you don't believe, please take a look the change of the moving everage, during the sideway market in "real time" . (Trust me , I have try this strategy before, in real time and manually )
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:32 AM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now