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

Trade Once Per Crossing
http://www.molanis.com/forum/viewtopic.php?f=13&t=220
Page 1 of 1

Author:  cosmicbeing [ Thu Jan 13, 2011 1:33 pm ]
Post subject:  Trade Once Per Crossing

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

Author:  molanisfx [ Thu Jan 13, 2011 5:13 pm ]
Post subject:  Re: Trade Once Per Crossing

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.

Author:  cosmicbeing [ Fri Jan 14, 2011 3:02 pm ]
Post subject:  Re: Trade Once Per Crossing

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

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/