MT4 code change to MT5 code
Read the help: Basic Principles

and
Successful completion of the Buy(...) or Sell() 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() and value returned by ResultDeal().
Basic Principles - Trading Operations - MetaTrader 5 Help
- www.metatrader5.com
is an instruction given to a broker to buy or sell a financial instrument. There are two main types of orders: Market and Pending. In addition, there are special Take Profit and Stop Loss levels. is the commercial exchange (buying or selling) of a financial security. Buying is executed at the demand price (Ask), and Sell is performed at the...
Hello, i have a code that use in MT4 which can alert the order send error.
But how can i change to MT5? Please help, Thanks
Above code is using in MT4, i want to change it to MT5.