Add order type to Telegram EA

 

Hi everyone,


I have downloaded this really useful EA from GitHub which sends MT4 updates to Telegram. However when I place a pending order it doesn't retrieve very much information. I managed to edit the code to include Price, TP and SL however I haven't been able to add OrderType. The original piece of code is included, any help would be gratefully received,

     
      // new pending placed
       if(tmp_pnd > totalpnd){
              if(alert_new_pending){
                  msg="New Pending order";
                  action4 = "New Pending order ";
                   msgpend =StringFormat("Name: %s\nSymbol: %s\nAction: %s",mySigalname,OrderSymbol(),action4);
                  if(MobileNotification){SendNotification(msgpend);}                
                  if(EmailNotification){SendMail("Order changes Notification",msgpend);}
                  if(AlertonTelegram){bot.SendMessage(InpChannelName,msgpend);}
                 }
       
       }


This is also included further down



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

string TypeMnem(int type) {
  switch (type) {
    case OP_BUY: return("buy");
    case OP_SELL: return("sell");
    case OP_BUYLIMIT: return("buy limit");
    case OP_SELLLIMIT: return("sell limit");
    case OP_BUYSTOP: return("buy stop");
    case OP_SELLSTOP: return("sell stop");
    default: return("???");
  }

 
Please edit your post and
use the code button (Alt+S) when pasting code