![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
problem closing trades
Hi,
I have been running v4.6 on a Demo account for a while now with a few currencies, including USDJPY. Now last week was an interesting week for that pair. I got an error which prevented to close the trades and protect my balance I guess.
this was what I got and it resulted in big losses.
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #37899166 sell 0.41 USDJPY closing at 96.916 failed [Trade context is busy]
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #37503307 sell 0.29 USDJPY closing at 96.916 failed [Trade context is busy]
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #37341276 sell 0.21 USDJPY closing at 96.916 failed [Trade context is busy]
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #37105700 sell 0.15 USDJPY closing at 96.916 failed [Trade context is busy]
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #36932361 sell 0.11 USDJPY closing at 96.916 failed [Trade context is busy]
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #36880523 sell 0.08 USDJPY closing at 96.916 failed [Trade context is busy]
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #36818543 sell 0.06 USDJPY closing at 96.916 failed [Trade context is busy]
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #36788755 sell 0.04 USDJPY closing at 96.916 failed [Trade context is busy]
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #36764352 sell 0.03 USDJPY closing at 96.916 failed [Trade context is busy]
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #36658383 sell 0.02 USDJPY closing at 96.916 failed [Trade context is busy]
2009.02.24 16:43:26 TradeDispatcher: trade context is busy
2009.02.24 16:43:26 '548920': order #36652930 sell 0.01 USDJPY closing at 96.916 failed [Trade context is busy]
Is this an issue with the broker, or is it a bug in the programming? Or better can this be prevented??
Thank you for this great EA. I have it running on my live account now and with limited risk, but not with USDJPY![](https://c.mql5.com/forextsd/smiles/tongue.png)
.
Steve, see post #502 for explanation.
Thank you very much.
I need another help please.
Someone have the bessing 2 v 4.6 ?
Please this is my e-mail stefanoportanti@alice.it
Thank you
ciao
Is this an issue with the broker, or is it a bug in the programming? Or better can this be prevented??
Appears to be broker related. Try increasing the slippage setting in the EA properties.
Question About MM
Hi Iron,
I had a question regarding the MM logic in your code. If you start out with $250/pair and MM is set to TRUE, the starting lot size should be .01 on a mini account. Does the lot size increase as your equity increases? Will the starting lot size be .02 when you have $500, .03 when $750, etc.? Or does the initial deposit variable need to be increased manually based on your current equity?
Thanks for your help,
PipN8ntEZ
Yes, that is what MM is designed for!
Hi Iron,
I had a question regarding the MM logic in your code. If you start out with $250/pair and MM is set to TRUE, the starting lot size should be .01 on a mini account. Does the lot size increase as your equity increases? Will the starting lot size be .02 when you have $500, .03 when $750, etc.? Or does the initial deposit variable need to be increased manually based on your current equity?
Thanks for your help,
PipN8ntEZYes, that is what MM is designed for!
Does the EA have to be restarted? For some reason the lots did not automatically adjust.
it shouldn't have to be restarted if mm is true
it shouldn't have to be restarted if mm is true
For some weird reason, it's not picking up the correct lot size based on my equity. Are there any other settings that would cause the lot size to be incorrect?
I want to say Thank you to everyone who has contributed to this ea. You have done a fine job.
I am reviewing the code of the current version, and I see that the TimeGrid variable is set at 2400 seconds.
What does it mean and how was it derived?