Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 417
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
Folks, help is needed. The function has to close half of the orders necessarily starting with the oldest one. In the first case, the orders are closed one by one for some reason, and in the second, they start closing in the wrong order.
So I need an integer...
MathRound
so this is rounding, the number does not become int, it remains double
so this is rounding, the number does not become int, but remains double
So? Is there a fundamental difference between 1 and 1.0 for calculations? Of course the format is double, but the value is integer.
An especially perverted variant then: DoubleToStr and then StringToInteger
Please tell me how to remove the warning in the new compiler
possible loss of data due to type conversion
Thank you, so no pre-warning, it's already eating my eye)
Hi, I've searched Kim's, but I can't find anything that lets me know: Which order (pending) opened the position from? From a limit order or a stop order?
I tried to compare prices of the last order opened
with a position opened on it but the whole logic is broken. Maybe there is something more suitable? Thanks!
Folks, help is needed. The function should close half of the orders necessarily starting with the oldest one. In the first case, the orders are closed one by one for some reason, and in the second, they start closing in the wrong order.
There was a question like this, how to close orders starting with the oldest one, a couple of pages later there is an answer and the correct code.
https://www.mql5.com/ru/forum/145455/page406
Hi, I searched Kim's, but I can't find anything that lets me know: Which order (pending) opened the position from? From a limit order or a stop order?
I tried to compare prices of the last order opened
with a position opened on it but the whole logic is broken. Maybe there is something more suitable? Thanks!
Boris. Try writing in the commentary of the orders - limit to limit, stop to stop. Then from these comments of open positions you will know what the legs have grown from. Only partial closing of these comments will erase them. Maybe something else can kill the comments. Only deleted positions are saved in the history. The ones that worked aren't there. You have to go through... You can't figure out what you have to go through...