What code should I add into EA in MT4 to avoid hyperacivity alert in FTMO prop firm?

 

Hello, as in tittle, What code should I add into EA in MT4 to avoid hyperacivity alert in FTMO prop firm?


Did you happen to have 200 orders open simultaneously or 2,000 trades/order modifications that day? That's as much as the FTMO servers can handle and will temporarily lock your account for "hyperactivity" if you exceed their limits: https://ftmo.com/en/faq/which-instruments-can-i-trade-and-what-strategies-am-i-allowed-to-use/.
Which instruments can I trade and what strategies am I allowed to use?
Which instruments can I trade and what strategies am I allowed to use?
  • ftmo.com
Your trading style is up to you. As long as your trading is legitimate (in line with proper risk management), conforms to the real market conditions, and does not resemble forbidden practices, we have no reasons for limiting or restricting your trading strategy, whether it’s discretionary trading, algorithmic trading, EAs, etc. When trading, keep in […]
 
Hmmm, could you share your code or your risk part?
 
fxprofessional:


did you get the warning email from FTMO? that is a good size limit. If you exceeded that then you have a big coding problem. you should ask ftmo support for more specific description of what they call hyperactivity, however, it usually means all lines in the journal. check your logs for errors. not enuf money and 130 errors are most ccommon i found that can exceed this limit on a broker i wont mention its name.

 
fxprofessional:
What code should I add into EA in MT4 to avoid hyperacivity alert in FTMO prop firm?

The info that you quoted seems to suggest the answer:

fxprofessional:
Did you happen to have 200 orders open simultaneously or 2,000 trades/order modifications that day?

In the case of 200 orders open simultaneously:

  • If you're multi-symbol basket trading, reduce the number of symbols that you're trading
  • If you're hedging/stacking trades, reduce the max number of open orders.

In the case of 2000 trades/order modifications per day, a tick-based trailing stop can cause that. In this case, change it to a stepped trailing stop.

Anyway, it's tough to say which code to add when we don't know which code you already have.

 
Yes, its due to trailing stop I think, any propositions how to programm this to make sure not exceeded this limit? Its about notifications limit. 
 
fxprofessional #:
Yes, its due to trailing stop I think, any propositions how to programm this to make sure not exceeded this limit? Its about notifications limit. 

It figures. Pending/working orders are stored trade-server-side. Every time price ticks your way, a tick-based trailing stop pings the trade-server.

MQL5 Book: Trailing stop / Trading automation
MQL5 Book: Trailing stop / Trading automation
  • www.mql5.com
One of the most common tasks where the ability to change protective price levels is used is to sequentially shift Stop Loss at a better price as...
 
ok, now I deleted all trailing stops etc., but profit may be worse and I will add max number of trades restriction to make sure limit won't be exceeded, I heard that is not possible delete notification about opened trade and closed trade, so as I understand max 1000 trades I need to calculate(because every trade is opening (1 notification in journal) and closing 2nd notification in journal, I will set up max 900 trades, because maybe other notifications will be, I hope it will be enough, I will be testing this on Monday of course on demo account, at least 5 days checking this on demo account. you know, these prop firms like FTMO is doing a lot of restriction and you even may have profit, but you broken one rule and finish, account suspended... 
 


There are 1440 minutes in a day and that limit is close enough to the 2000 modifications.


So simple minute code can prevent more than 1440 modifications per day by one EA.

 if (minute()==lastminute) return; 

 else lastminute=minute();  //update minute  

// update a trailing stop or whatever


If you wanted to update faster then you can use Seconds instead of Minutes

and keep a count of trades and modifications in a Global Variable to prevent exceeding that number.

 
fxprofessional #:
ok, now I deleted all trailing stops etc., but profit may be worse and I will add max number of trades restriction to make sure limit won't be exceeded, I heard that is not possible delete notification about opened trade and closed trade, so as I understand max 1000 trades I need to calculate(because every trade is opening (1 notification in journal) and closing 2nd notification in journal, I will set up max 900 trades, because maybe other notifications will be, I hope it will be enough, I will be testing this on Monday of course on demo account, at least 5 days checking this on demo account. you know, these prop firms like FTMO is doing a lot of restriction and you even may have profit, but you broken one rule and finish, account suspended... 
try virtual trail stop instead, and you can still update your real sl, only do it less often.
 
Michael Charles Schefe #:
try virtual trail stop instead
ok, good idea.
 
fxprofessional #:
ok, good idea.

I linked to code that includes a stepped trailing stop in Post #5. The concept implemented is to only adjust your stop after every x pips that price moves into profit. This is less random than a timer.

In that linked documentation:

const uint step;     // movement step (sensitivity) in points