
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
My understanding of the main benefit of MQL5 is the ability to be able to place trades without having to wait for the trade to be completed.
This is accomplished using
OrderSendAsync
which you can then check using the
OnTradeTransaction handler
so this much I understand.
My problem is understanding how to close a Position
if I use PositionClose then what do i do?
Successful completion of the PositionClose(...) method does not always mean successful execution of the trade operation. It is necessary to check the result of trade request (trade server return code) using ResultRetcode().
so this part I am completely confused by
ResultRetcode
Gets the code of request execution result.
uint ResultRetcode() const
Return Value
The code of request result.
I completely don't understand how to use this in the context of closing multiple positions
How does ResultRetCode know which postion close I am checking?
How do I request to close a few positions, then check each that it is closed?
is there any alternate way in the API to close positions rather than PositionClose()?
p.s. what is the secret of getting email notifications to responses to my threads? I have it configured in the settings - my email is there plus the notification checkboxes are checked, but I never get notification emails.