molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Fri May 03, 2024 4:42 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Trade Once Per Crossing
PostPosted: Thu Jan 13, 2011 1:33 pm 
Offline

Joined: Wed Dec 22, 2010 1:10 pm
Posts: 5
Hi,

I am using MT5 EA Wizard for a simple MA Crossing EA.

Your MT5 EA Wizard works fine and is fun to use and learn from.

Right now it makes 100's of trades while the basic MA cross condition is True.

How do I make it trade only ONCE per crossing...until the MA's cross again?

Thanks for your help,
Robert


Top
 Profile  
 
 Post subject: Re: Trade Once Per Crossing
PostPosted: Thu Jan 13, 2011 5:13 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
To define a cross you need to analyze 2 bars. You need 2 TAs connected by an AND. The trading conditions are defined to get the cross, something like
previous bar condition 1 < previous bar condition 2 AND current bar condition 1 > current bar condition 2
You can use the current and previous bar, or the previous and the one before the previous (use shift to define which bar). There are a number of combination you can use.


Top
 Profile  
 
 Post subject: Re: Trade Once Per Crossing
PostPosted: Fri Jan 14, 2011 3:02 pm 
Offline

Joined: Wed Dec 22, 2010 1:10 pm
Posts: 5
molanisfx wrote:
To define a cross you need to analyze 2 bars. You need 2 TAs connected by an AND. The trading conditions are defined to get the cross, something like
previous bar condition 1 < previous bar condition 2 AND current bar condition 1 > current bar condition 2
You can use the current and previous bar, or the previous and the one before the previous (use shift to define which bar). There are a number of combination you can use.


Thanks so much!

I was expecting a little more complicated...like passing variables...from Current Cross to Past Cross...or something like that.

So far...this is an easy solution...and so far it works great!

And my continued thanks for your MT5 EA Visual Wizard... I keep learning new things!

Robert


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009