- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
- Coding help
- Vertical Line
Buy a more powerful computer? Seriously, besides the complexity of your program logic, communication delay in the Internet and queueing/trade processing time at the broker side may take bigger portion of the total 'trade execution time'.
I was considering that. Most the time the program works great. I was first thinking
about upgrading my proc so that it can simply execute this program faster. Nothing
like MORE RAM, MORE POWER and then possibly multi threading.
Is there anyway to get better performance out of MQL4? Because of this language being single thread, it sometimes misses trades that are trying to be executed at the same time in my expert. How do you do it?
hi, jyett77
u should know multi-thread program is easier to crash, when using some api, such as getCurrentDirectory, GetModuleFileName.etc
and u should use looping -"for" and pending order, to avoid missing chance of entering market~ ~
> it sometimes misses trades that are trying to be executed at the same time in my expert
1) Alter your code to handle order errors, so the the action can be repeated as needed
2) Split the heaviest EA's to their own copy of MT, so you get an additional and separate order thread
FWIW
-BB-
> it sometimes misses trades that are trying to be executed at the same time in my expert
1) Alter your code to handle order errors, so the the action can be repeated as needed
2) Split the heaviest EA's to their own copy of MT, so you get an additional and separate order thread
FWIW
-BB-
Additionally - if you are receiving "Trade Context Busy" errors, then you should make use of the function IsTradeAllowed() within a condition statement immediately before submitting order requests.
CB
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use