Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1035

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
I want to get acquainted with developing interfaces in MQL5 on EasyAndFastGUI
There are 10 parts (or what?) of "Graphical Interfaces" articles from 2015
I have a question, are they all consistent, or is there no point in reading the older ones?
Hi all, I have a question about MQL5.
I have not found a good example of how to close an order correctly. I know how to close an order and use CTrade class, but is there a good ready solution?
The idea is not to send a close command but to have a function which returns true only after I've received "YES, POSITION IS FULLY CLOSED, Relax" reply from broker.)
I know about trade.ResultRetcode() and TRADE_RETCODE_DONE too, but I don't want to re-invent a wheel, has anyone have a ready solution?
Hi, I have a question about MQL5.
I have not found a good example of how to correctly close an order. I know how to close an order and use the CTrade class, but is there a good ready solution?
The idea is not to send a close command but to have a function which returns true only after I've received "YES, POSITION IS FULLY CLOSED, Relax" reply from broker.)
I know about trade.ResultRetcode() and TRADE_RETCODE_DONE too, but I don't want to re-invent a wheel, has anyone have a ready solution?
OrderClose from MT4Orders will return true with the same logic as in MT4 - when position will be closed.
OrderClose from MT4Orders will return true with the same logic as in MT4 - when the position is closed.
I think, like last time MT5 adepts will appear and criticise your library, that would be OK... but not many people know how to use the order system of MT5 ))))
The OrderClose from MT4Orders will return true with the same logic as in MT4 - when the position is closed.
I think like last time MT5 adepts will show up to criticise your library, that would be OK... but not many people know how to use the order system of MT5 ))))
It's strange that there is no ready-made solution available from mql5 developers. The order, deal and position are really tearing the brain apart. Position is something that is open, and if it's already closed, what is it? What does HistoryOrdersTotal return if, logically, one order opens a position and the other closes it, i.e. two per position... in this case, the ticket of the opening order (sometimes, maybe, maybe) raises the position id, but then what is the ticket of the closing one????
Strange that there is no ready-made solution from the mql5 developers.
There is.
I just can't solve a trivial problem - I need to access this last entity (by tickit probably) and collect information about it - opening/closing time, volume, etc. Suppose that this something was opened by one order and closed by one order too. So, we should take the last two orders from HistoryOrderTotal and use them for some analysis? What if the ticket types are different...
How is such a reference to the history solved in practice?