
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
And which MT4Orders functions are used - asynchronous (OrderSendAsync, OrderCloseAsync) or not? This is probably the problem.
I haven't looked into it, just connected it, checked speed, compared it to original code on mql5, deleted original and left only library with mql4 code
I did not understand it, just plugged it in, checked the speed, compared it to the original code on mql5, deleted the original and left only the library with mql4 code
I'm not asking about the details of the library, but how it has been used, to understand the problem. In general, I gave a tip.
I wasn't asking about the insides of the library, I was asking about how it was used, to see what was causing the problem. Anyway, I gave you a tip.
The problem is not how to use the library.
The problem is that we do not have a complex position in MT4, we have orders. And the result of closing a dozen orders will be the same as shown above.
By the way, there is no such effect in the tester. And we do not have it on the demo. But we have it on the real account.
In this case, code migration from mql4 to mql5 and back "1 to 1" is impossible.
The work with orders on mql4 must be organized adequately to the possibilities of mql4.
There is no way to tell here:
The only big drawback of MT4 ...
It's just that mql4 has some features and mql5 has other features. In this particular case mql5 has the advantage. But the problem can be solved normally with mql4.
The problem is not how to use the library.
The problem is that in MT4 there is no aggregate position, there are orders. And closing a dozen orders has the effect shown.
By the way, there is no such effect in the tester. And we do not have it on the demo. But we have it on the real account.
In this case, code migration from mql4 to mql5 and back "1 to 1" is impossible.
The work with orders on mql4 must be organized adequately to the possibilities of mql4.
There is no way to tell here:
It's just that mql4 has some features and mql5 has other features. In this particular case mql5 has the advantage. But this problem can be solved normally on mql4.
What can be accelerated in MT4?
The problem is not how to use the library.
The problem is that in MT4 there is no aggregate position, there are orders. And closing a dozen orders has the effect shown.
It is only reasonable to compare MT4 with a hedging account of MT5 (in this case it is just such a trading system). And what does that have to do with the aggregate position? In MT5 there will be exactly the same pile of positions = equivalents of quad orders. Anyway, you're taking the conversation away from the problem again.
What can be accelerated in MT4?
I suggested above to replace with XXXAsync functions. Not sure if it will help, but why not give it a try?
I suggested above to replace with XXXAsync functions. Not sure if it will help, but why not give it a try?
It's probably a bit off. I have no problem in MT5 with this code, and using <MT4Orders>, everything closes instantly.
There is a problem in MT4, but there for obvious reasons and do not need <MT4Orders>, there is the simplest quadruple code. I have more than one hundred of them, I've got screenshots. Sometimes it slides in my favour, and quite often, if a close has started and the price has moved on. I don't know what it's related to, but it's probably due to the sequence of sending orders.
Forum on trading, automated trading systems and trading strategy testing
Why does Metaquotes slip MT5 instead of MT4?
Vitaly Muzichenko, 2017.09.23 20:50
What can be accelerated in MT4?
At the very least:
The normalisation of the price value is only necessary when mathematical operations are performed on it. When a value is added to or subtracted from the price.
Probably a bit of a misunderstanding. I have no problem in MT5 with this code, and using <MT4Orders>, everything closes instantly.
There is a problem in MT4, but there for obvious reasons and does not need <MT4Orders>, there is the simplest quadruple code. I have more than one hundred of them, I've got screenshots. Sometimes it slides in my favour, and quite often, if a close has started and the price has moved on. I don't know what it's related to, but it's probably the order sending sequence.
Yes, it is my fault - I am dumb.
The variant of solution is as follows: instead of closing several orders, I place a counter total volume, and then call OrderCloseBy several times until mutual destruction.
The solution is as follows: instead of closing several orders, put a counter total volume, and then call OrderCloseBy several times until mutual destruction.
This variant works, unfortunately, only for one symbol.
It's strange that nobody has added asynchronous Order-functions to the MT4 kodobase over the years.