EA with 2MA problem

 
Hello All,

Let me ask, I'm  a newer in MQL4 and learnig to write EA with 2MA crossover. 

The result is that both Buy and Sell orders are issued.

How to solve it, only buy or sell?  Buy when MA1>MA2 and Sell when MA1<MA2.


Thanks in advance.

Kiae.

 
Hi, what you do already to resolve this problem, write this post? Regards Greg
 
7768743: How to solve it, only buy or sell?  Buy when MA1>MA2 and Sell when MA1<MA2.
You test for MA1 > MA2 and only buy if true. You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
          No free help (2017)

Or pay someone. Top of every page is the link Freelance.
          Hiring to write script - General - MQL5 programming forum (2018)

We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
          No free help (2017)

 

There are "2 MA Crossover" EA and "3 MA Crossover" EA and more:
this is the search results links here.

Reason: