You should always look at the help:
Access to the last request execution results |
|
Gets the copy of the structure of the last request result | |
Gets the code of request result | |
Gets the code of request result as a string | |
Gets the deal ticket | |
Gets the order ticket | |
Gets the volume of deal or order | |
Gets the price, confirmed by broker | |
Gets the current bid price (the requote) | |
Gets the current ask price (the requote) | |
Gets the broker comment |
Documentation on MQL5: Standard Library / Trade Classes / CTrade / Result
- www.mql5.com
Result(MqlTradeResult&) - CTrade - Trade Classes - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
https://www.mql5.com/en/docs/trading
In this section of the reference material there are functions to return the history of closed positions. I haven't used them myself yet but have seen others mention them in forum posts. The link in the reply above will only give you info on the last position closed. The history functions let you access more/all of the previously closed positions.
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
How do I get the close price after calling PositionClose?
Thank you