forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Expert Advisor Studio → Trade context is busy

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 6

Topic: Trade context is busy

Ok i'm running around 2500 strategy's on a MT4 setup
with around 25 portfolio files.
All is running on the 1h and 4h timeframe.

I see that each full hour the ea closes , opens new and modify orders.
All happens in the first 15 seconds of the hour.
This results in messages; [Trade context is busy]

Does anyone had this same issue and can i fix that by changing
#define TRADE_RETRY_WAIT  100

into say 15000  (for retry wait 15 seconds) 
and then set this for each portfolio file little higher so first portfolio file 20000 next 25000 , third
30000 etc. 

thanks!

Re: Trade context is busy

Ok 4get my question, this fixed the issue smile

Re: Trade context is busy

How did you solve the "Trade context is busy" error?

Re: Trade context is busy

MT4 Broker has about 200 to 400 max positions allowed to open, so even if you have thousands of EA, some can't open position because it hit the limit and this would affect the real performance result of the EA

Re: Trade context is busy

hannahis wrote:

MT4 Broker has about 200 to 400 max positions allowed to open, so even if you have thousands of EA, some can't open position because it hit the limit and this would affect the real performance result of the EA

Yes I know that. I am asking what is the solution to solve the "Trade context is busy" error?

Re: Trade context is busy

hello Lance,

the issue was only on the 1m Timeframe it tried to open too much trades the same time where it skipped some trades.
in the config from the portfolio file, you can change the retry cound and retry wait
retry wait = when an order errors out it waits 100ms for the next try. 4 says it retries 4 times befor it gives up.

#define TRADE_RETRY_COUNT 4
#define TRADE_RETRY_WAIT  100
#define OP_FLAT           -1


hope this is clear it helped with my 1m setup with a couple of 1000's of ea's

Posts: 6

Pages 1

You must login or register to post a reply

Forex Software → Expert Advisor Studio → Trade context is busy

Similar topics in this forum