Features of the mql5 language, subtleties and tricks - page 185
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
Result.
100 lots were placed, but at some point the lots became 72.8. Obviously, the trading algorithm can be disoriented in such a situation.
Search string: Oshibka 011.fxsaber:
Он должен быть неизменным - равным тому, что был отправлен в OrderSend.
Actually no, there is a chance of being out of sync, which is what happens, there is a workaround, there is no easy solution at all
Actually no, there's a chance of getting a timing mismatch, which is what happens, there's no easy solution at all
I don't even have a simple solution. How to make sure that there is a desync in some running script is not at all clear.
I don't even have a complicated solution. How to make sure in any running script that there is an asynchrony is not at all clear.
If the total lot has changed, keep counting until the lots for orders and positions are the same twice.
There is a probability of fractions or just a few percent, so it won't affect the performance.
__________
I looked at your prints, maybe it's a bug, if it's a case of async, the wrong amount should not be repeated in the same way in several calculations
If the total lot has changed, keep counting until the lots for orders and positions are the same twice.
There is a fraction or a few percent probability of a misalignment, so the performance is almost unaffected.
In the log above, three consecutive calculations show the wrong result. We need Sleep, but this may lead to delays, when we won't have time to react to the trade order being issued.
This is not a pleasant situation.
In the log above, three consecutive calculations show the wrong result.
Yes, I saw that, I added it to the top
You shouldn't be offended. The highest probability is an error in the code. In second place is the exorbitant spread. But who but you can discard the first option and begin to consider the second without seeing the code. I hope the moderators will move the topic to the wrong one.
Thanks for the adequate reply. I am not offended, I am upset)). I wrote to try to find a quick solution, which may be someone who has already encountered this. The code is absolutely standard, totalprofit loop summing and comparing to a given value, moreover the code has been working for a couple of months on two different accounts without failing. Have a nice day.
Thank you for the adequate response. I'm not offended, I'm saddened)). I wrote to try and find a quick solution, which maybe someone who has already encountered it has. The code is absolutely standard, totalprofit loop summing and comparing to a given value, moreover the code has been working for a couple of months on two different accounts without failing. Have a nice day.
This is not on the subject of features.
I agree.