Gets the code of request result.
uint ResultRetcode() const
The Code of request result.
How can I get the result using the above function? in CTrade class I mean.
Please give an example.
Take a look at this article https://www.mql5.com/en/articles/481 and example below using Ctrade, probably will help you.
//--- 1. example of buying at the current symbol
//--- failure message
Print("Buy() method failed. Return code=",trade.ResultRetcode(),
". Code description: ",trade.ResultRetcodeDescription());
Print("Buy() method executed successfully. Return code=",trade.ResultRetcode(),