Covert mql4 to mql5

 
Hey guys, I have code from mql4 that i want to change to mql5 but don't know how to 
Hey guys, I have code that is in mql4 that i want to convert to mql5 but i dont know how.

int i = OrdersHistoryTotal()-1;
   if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY) == true)
     {
      OCP = OrderClosePrice();
      if(OCP == OrderStopLoss())
        {
         PlaySound("Broke Man");
        }
      if(OCP == OrderTakeProfit())
        {
         PlaySound("Chi Ching");
        }
    
 }

Basically, i'm trying to play a sound whenever I hit SL/TP.
 

See in here: https://www.mql5.com/en/docs/constants/structures/mqltraderequest

The examples of code on the bottom part of that page.

Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Trade Request Structure
Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Trade Request Structure
  • www.mql5.com
Interaction between the client terminal and a trade server for executing the order placing operation is performed by using trade requests. The trade request is represented by the special predefined structure of MqlTradeRequest type, which contain all the fields necessary to perform trade deals. The request processing result is represented by...