help notification mobile push

 

can you help me solve a problem in MT5. I used a code on MT4 that sent me mobile notifications of executed from my account, now I have switched to MT5 but this code cannot read it tells me that there are errors. Can you help me correct the code I saw that on the forum you have already worked on sendnotifications. I'll post the code below, thanks if you can solve the problems with MT5


//+-----------------------------------------------------+

//|                 Notifiche MT4 per Mobile - WIN 2013 |

//+-----------------------------------------------------+

#property indicator_chart_window

datetime dt;

int oldtemp;

int oldhist;

//+-----------------------------------------------------+

//| Custom indicator initialization function            |

//+-----------------------------------------------------+

int init()

  {

//---- indicators

   dt = Time[0];

   oldtemp = 0;

   oldhist = OrdersHistoryTotal();

   Comment("\nNotifica Mobile"); 

  }

  

//+-----------------------------------------------------+

//| Custom indicator deinitialization function          |

//+-----------------------------------------------------+

int deinit()

  {

//----

   

//----

   return(0);

  }

//+-----------------------------------------------------+

//| Custom indicator iteration function                 |

//+-----------------------------------------------------+

int start()

  {

 

/////////////////////////////////

//for opened and pending orders//

///////////////////////////////// 

  

   if (oldtemp < OrdersTotal())

   {

      string message;

   

      OrderSelect(OrdersTotal()-1, SELECT_BY_POS);

   

     //BUY

      if(OrderType()==OP_BUY && OrderCloseTime()==0 && OrderSymbol() == Symbol()) {

      message="OPEN BUY: "+Symbol()+" at:"+DoubleToStr(OrderOpenPrice(),5)+" SALDO:"+DoubleToStr(AccountEquity(),2);

      SendNotification(message);

      }

   

     //SELL

      if(OrderType()==OP_SELL && OrderCloseTime()==0 && OrderSymbol() == Symbol()) {

      message="OPEN SELL: "+Symbol()+" at:"+DoubleToStr(OrderOpenPrice(),5)+" SALDO:"+DoubleToStr(AccountEquity(),2);

      SendNotification(message);

      }

        

   }

      oldtemp = OrdersTotal();

   

/////////////////////////////////

//for closed or canceled orders//

/////////////////////////////////



   if (oldhist < OrdersHistoryTotal())

   {

      OrderSelect(OrdersHistoryTotal()-1, SELECT_BY_POS,MODE_HISTORY);

  

  //BUY CLOSE

      if(OrderType()==OP_BUY && OrderCloseTime()>0 && OrderSymbol() == Symbol()) {

      message="CLOSE BUY: "+Symbol()+" at:"+DoubleToStr(OrderClosePrice(),5)+" PROFIT:"+DoubleToStr(OrderProfit(),2)+" SALDO:"+DoubleToStr(AccountEquity(),2);

      SendNotification(message);   

      }


  //SELL CLOSE

      if(OrderType()==OP_SELL && OrderCloseTime()>0 && OrderSymbol() == Symbol()) {

      message="CLOSE SELL: "+Symbol()+" at:"+DoubleToStr(OrderClosePrice(),5)+" PROFIT:"+DoubleToStr(OrderProfit(),2)+" SALDO:"+DoubleToStr(AccountEquity(),2);

      SendNotification(message);   

      }

   }

      oldhist = OrdersHistoryTotal();

 

//----

   return(0);

  }

//+----------------------------------------+