MT4 EA

 

Hi all,


My mt4 ea is based on 1minute timeframe based on moving average but it opens and closes trade every minute and keeps on repeating. How do I fix this problem ? Please help is needed. I have used function such as max open trade, max long trade, max short trade, max pending trade etc, but I can't seem to find out the problem.

Creating Multi-Expert Advisors on the basis of Trading Models
Creating Multi-Expert Advisors on the basis of Trading Models
  • www.mql5.com
Using the object-oriented approach in MQL5 greatly simplifies the creation of multi-currency/multi-system /multi-time-frame Expert Advisors. Just imagine, your single EA trades on several dozens of trading strategies, on all of the available instruments, and on all of the possible time frames! In addition, the EA is easily tested in the tester, and for all of the strategies, included in its composition, it has one or several working systems of money management.
 

Dear friend<

try to put a Deals Counter filter ..


best luck

 
Hey32: My mt4 ea is based on 1minute timeframe based on moving average but it opens and closes trade every minute and keeps on repeating. How do I fix this problem ? Please help is needed. I have used function such as max open trade, max long trade, max short trade, max pending trade etc, but I can't seem to find out the problem.

If you need help then show your code and explain in more detail.

 
How many EAs can you run on MT4? and I trade with FP Markets, can the broker see my EA?
 
Martial-Mason #: How many EAs can you run on MT4? and I trade with FP Markets, can the broker see my EA?

One EA per chart with a maximum of 100 charts per terminal, and 32 terminals per computer session.

A broker cannot see your EA source code, but will know that you are trading with an EA.

 
Hey32 #: I am using 12 different strings of tech companies
  1. Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  2. if(iMA(s2, PERIOD_CURRENT, 50, 0, MODE_SMA, PRICE_CLOSE, 0) > (s2, PERIOD_CURRENT, 200, 0, MODE_SMA, PRICE_CLOSE, 0) //Moving Average > Moving Average
    Do not post code that will not even compile.
 
William Roeder #:
  1. Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  2. Do not post code that will not even compile.
This was just an example it doesn’t have to be those symbol and as per compilation , it’s successful without any error or warning. I just want to know what is causing constant opening and closing of a trade. Thanks if you can help much appreciated 
 
Hey32 #: This was just an example it doesn’t have to be those symbol and as per compilation , it’s successful without any error or warning. I just want to know what is causing constant opening and closing of a trade. Thanks if you can help much appreciated 
  1. Repeat!
    Please edit your post and use the "</>" icon or Alt-S to post your code properly, otherwise it's difficult to read, especially with the double line white-space (so clean it up).
    Alternatively given that it is quite long, attach it as a file instead.
  2. Repeat!
    If you want us to analyse it properly, then make sure it can compile. This is important even if it is just an example.
 
Fernando Carreiro #:

If you need help then show your code and explain in more detail.

Hi sir , I couldn't upload the file so I have posted first half of the code and then the second half of the code. Please look into it. thank you so much

 
Hey32 #: Hi sir , I couldn't upload the file so I have posted first half of the code and then the second half of the code. Please look into it. thank you so much

Use the "+ Attach file" icon below the text field.


 
Fernando Carreiro #:

Use the "+ Attach file" icon below the text field.


Here is the file sir. 

Files:
demooo.mq4  45 kb
Reason: