-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement ResultRetcode function #119
Comments
Hi, |
Function ResultRetcode can't be implemented because it can work with CTrade structure only. But this structure is not stored after call function PositionClose. I have added out parameter to function PositionClose (same to PositionOpen): MqlTradeResult structure has all needed information about trade function. Please confirm, is this implementation correct for you? |
This implementation is correct for me! |
Great. I am closing the issue. |
Hi!
Could you Implement ResultRetcode() CTrade function in MT5?
For example, if trade.PositionClose(ticket, deviation) returns false I need to know exact error was occurred. In my case it was NO_MONEY and ResultRetcode() returned the code: 10019.
From PositionClose article:
The text was updated successfully, but these errors were encountered: