I have an EA which opens a big number of trades (it uses a system similar to grid trading), so when backtesting it, I often get error 148 (ERR_TRADE_TOO_MANY_ORDERS).
To avoid this problem, I ask you: is there a MQL4 function that returns the maximum number of open trades, so that I can code this info in the EA?
Obviously I could check this info for any particular broker I use, but this way I couldn't code it directly in the EA.
Thank you very much.
- Magic Number
- Questions from Beginners MQL5 MT5 MetaTrader 5
- Return Positive value of a number
I have had the trade too many orders error manually trading but it goes away after a while and I am able to place another trade later. So it could be that your access to the brokers server has been denied because it can't handle all the trade requests its getting at that moment in tme. Its not you its them that can't handle the trafic. Just my experience of the error. However the best way to get the answer to your question is to ask your broker.
brouwer89:
You can do this: Get the "
maximum number of open trades " from your broker and hardcode (may be a parameter) it in your code. If you're sure this error goes away after a while, then put a time=out function after receiving error..
I have an EA which opens a big number of trades (it uses a system similar to grid trading), so when backtesting it, I often get error 148 (ERR_TRADE_TOO_MANY_ORDERS).
To avoid this problem, I ask you: is there a MQL4 function that returns the maximum number of open trades, so that I can code this info in the EA?
Obviously I could check this info for any particular broker I use, but this way I couldn't code it directly in the EA.
Thank you very much.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register