Forex
Google

Go Back   Forex Trading > Discussion Areas > Setup Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 09-18-2007, 09:11 AM
Nomura Nomura is offline
Member
 
Join Date: Dec 2006
Posts: 30
Nomura is on a distinguished road
Question Trade context is busy !?

It would be grateful if somebody tell me what problem caused a EA occasionally (about 50%) fails to open an order with the error #146.
According to stderror.mqh, it is Trade context is busy. Is it a problem of broker , my internet connection or EA ?
Thanks in advance.
Nomura
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-18-2007, 09:35 AM
mrv mrv is offline
Member
 
Join Date: Oct 2006
Location: Currently in UK
Posts: 89
mrv is on a distinguished road
This error means that 2 or more eas are trying to open, close or modify their orders at the same time. There is one "stream" in metatrader for ea trading, so if one ea is busy talking to server, all the rest will have to wait until it finishes.

How to solve:
1. if you can code, just go to Error 146 ("Trade context busy") and How to Deal with It - MQL4 Articles, there is a description of this problem and functions to add to your code to avoid this happening in future.
2. If you cannot code, just use 1 ea per metatrader, or (if you want to run more than 1) make sure they will not trade too often. If you run 2 scalping eas at the same time, you will get quite a lot of errors 146.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-18-2007, 11:28 AM
Nomura Nomura is offline
Member
 
Join Date: Dec 2006
Posts: 30
Nomura is on a distinguished road
Thumbs up Trade context busy

Quote:
Originally Posted by mrv View Post
This error means that 2 or more eas are trying to open, close or modify their orders at the same time. There is one "stream" in metatrader for ea trading, so if one ea is busy talking to server, all the rest will have to wait until it finishes.

How to solve:
1. if you can code, just go to Error 146 ("Trade context busy") and How to Deal with It - MQL4 Articles, there is a description of this problem and functions to add to your code to avoid this happening in future.
2. If you cannot code, just use 1 ea per metatrader, or (if you want to run more than 1) make sure they will not trade too often. If you run 2 scalping eas at the same time, you will get quite a lot of errors 146.
mrv
Thanks for your advice.
I just applied a simple EA to several currency pairs with 30m TF. As your advice, orders for different pairs were triggered in the same time. I think this caused the "Trade context busy".
I cannot code by myself and I can read simple coding only. I think I can learn much in this Forum especially from you.
Thanks with many thanks.
Nomura
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/setup-questions/9682-trade-context-busy.html
Posted By For Type Date
MoneyQs » Blog Archive » Trade context is busy !? This thread Pingback 09-18-2007 12:21 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
To trade or not to trade Indicators? yaniv_av Indicators - Metatrader 4 1 03-27-2007 01:01 PM


All times are GMT. The time now is 01:18 PM.