Hello,
I came across information on the EarnForex forum stating that MT4 has only 1 trade context, which is why it often shows error 146 ("Trade context busy"). On the other hand, MT5 has 8 trade contexts, making it more suitable for Algo trading because it is unlikely for all 8 trade contexts to be busy at the same time. Can anyone confirm if this information is accurate?
Thank you :)
What is the context of this conversation about context?
What do you mean by trade context?
The "trade context" in MT4 determines whether EA or script can execute trades. In MT4, there is only one trade context available at a time, which can lead to errors like "Trade context busy" (Error 146) if multiple EAs or scripts attempt to trade simultaneously. This limitation can impact the ability of EAs to open positions successfully.
Need to ensure that the trade context is free before using functions like IsTradeAllowed()
While MT5 offers eight trade contexts, making MT5 more suitable for algorithmic trading due to the reduced likelihood of all contexts being busy simultaneously.
Hope this helps.
- www.mql5.com
What do you mean by trade context?
How many Trade can be executed and Modified at same time by One or Multiple EA in same Trading account.
While MT5 offers eight trade contexts, making MT5 more suitable for algorithmic trading due to the reduced likelihood of all contexts being busy simultaneously.
In Article URL, which you provided me, some peoples says in comments that MT4 also have 8 Trade contexts. Is this mean MT4 & MT5 both have same 8 Trade contexts?
-- clarify your question
-- clarify what exactly are you aiming to achieve
It is clear that there is a difference in the number of trade contexts between MT4 vs MT5.
MT4 is commonly known to have only 1 trade context, which can lead to errors like "Trade context busy" when multiple trade operations are attempted simultaneously. On the other hand, MT5 is designed with 8 trade contexts, making it more suitable for algorithmic trading due to the reduced likelihood of all contexts being busy at the same time.
Therefore, the claim that MT4 also has 8 trade contexts, as suggested in some comments, contradicts the established understanding that MT4 has only 1 trade context.
-- clarify your question
I want to know what the difference between MT4 & MT5 in aspect of Trade Contexts. currently i am using MT4 and i frequently get Error 146 ("Trade context busy")
-- clarify what exactly are you aiming to achieve
my EA is hyperActive. it frequently call functions like OrderSend(), OrderClose() and OrderModify(). I am just trying to find solution to above Error 146. If MT5 is really have more Trade Context than MT4, than i will upgrade my EA from MQL4 to MQL5. For that reason, i am looking for correct information.
I want to know what the difference between MT4 & MT5 in aspect of Trade Contexts. currently i am using MT4 and i frequently get Error 146 ("Trade context busy")
my EA is hyperActive. it frequently call functions like OrderSend(), OrderClose() and OrderModify(). I am just trying to find solution to above Error 146. If MT5 is really have more Trade Context than MT4, than i will upgrade my EA from MQL4 to MQL5. For that reason, i am looking for correct information.
how to handle error 146 on mt4 -- but not hard to change the code for mt5 use.
https://www.mql5.com/en/articles/1412
library code
https://www.mql5.com/en/code/8235
but if i got a hyperactive msg from my broker then i would move to a different one.
- www.mql5.com
What do you mean by trade context?
I believe Trade Context means, How many Operation can Metatrader handle from EA/Manual trading on same Tick.
how to handle error 146 on mt4
I know the solution like IsTradeAllowed(), Sleep(), and TradeIsBusy(). I am not looking for these solution because my EA trade during high impact news time and it made Hyperactive to execute, modify and close trade quickly without delay. That the reason i am looking an alternative solution.
but not hard to change the code for mt5 use.
I believe Trade Context means, How many Operation can Metatrader handle from EA/Manual trading on same Tick.
I know the solution like IsTradeAllowed(), Sleep(), and TradeIsBusy(). I am not looking for these solution because my EA trade during high impact news time and it made Hyperactive to execute, modify and close trade quickly without delay. That the reason i am looking an alternative solution.
what trades are you trying to open when you get they hyper message? pending or market/instant orders?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I came across information on the EarnForex forum stating that MT4 has only 1 trade context, which is why it often shows error 146 ("Trade context busy"). On the other hand, MT5 has 8 trade contexts, making it more suitable for Algo trading because it is unlikely for all 8 trade contexts to be busy at the same time. Can anyone confirm if this information is accurate?
Thank you :)