pips digitals

 

Hello,

i use EA to send email notification like this :

-------------

Close Sell GBPUSD 
Opened Time 2019.07.01 
Open Price 1.25720 
Close Price 1.25672 
Pips +44.80000

Email Notification  

--------------

i want to change the digital of pips to +44.8 for this example without the 0000


Can you help me please this is the code 


void SendOrderCloseAlert()

  {

   static datetime MyTime=TimeCurrent();

   string message="",title="",sign="";

   double pips=0,point=0;

   int digits=0;

   for(int i=0;i<OrdersHistoryTotal();i++)

     {

      bool select=OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);

      if(select && OrderCloseTime()>MyTime && TimeCurrent()>=OrderCloseTime()+_Seconds)

        {

         point=SymbolInfoDouble(OrderSymbol(),SYMBOL_POINT);

         digits=(int) SymbolInfoInteger(OrderSymbol(),SYMBOL_DIGITS);

         if(OrderType()==OP_BUY)

           {

            pips=NormalizeDouble(OrderClosePrice()-OrderOpenPrice(),digits)/(10*point);

            if(pips>0) sign="+";

            message="Close Buy "+OrderSymbol()+" \n"+ 

            "Opened Time "+TimeToString(OrderOpenTime(),TIME_DATE)+" \n"+ 

            "Open Price "+DoubleToString(OrderOpenPrice(),digits)+" \n"+ 

            "Close Price"+DoubleToString(OrderClosePrice(),digits)+" \n"+ 

           "Pips "+sign+DoubleToString(pips,digits)+" \n"+ 

            "Email notification" ;

            MyTime=OrderCloseTime();

            title="Close BUY "+OrderSymbol()+" Price "+DoubleToString(OrderClosePrice(),digits);

           }



         else if(OrderType()==OP_SELL)

           {

            pips=NormalizeDouble(OrderOpenPrice()-OrderClosePrice(),digits)/(10*point);

            if(pips>0) sign="+";

            message="Close Sell "+OrderSymbol()+" \n"+ 

            "Opened Time "+TimeToString(OrderOpenTime(),TIME_DATE)+" \n"+ 

            "Open price "+DoubleToString(OrderOpenPrice(),digits)+" \n"+ 

            "Close price "+DoubleToString(OrderClosePrice(),digits)+" \n"+ 

            "Pips "+sign+DoubleToString(pips,digits)+" \n"+ 

            "Email Notification" ;

            MyTime=OrderCloseTime();

            title="Close SELL "+OrderSymbol()+" Price "+DoubleToString(OrderClosePrice(),digits);

           }

         if(UseAlert) Alert(message);

         if(UseEmail) SendMail(title,message);

         if(UsePushNotify) SendNotification(message);

        }

     }

  }
 
Mehdi Zaouli:

i use EA to send email notification like this :

-------------

Close Sell GBPUSD 
Opened Time 2019.07.01 
Open Price 1.25720 
Close Price 1.25672 
Pips +44.80000

Email Notification  

--------------

i want to change the digital of pips to +44.8 for this example without the 0000

Can you help me please this is the code 

Instead of "DoubleToString(pips,digits)", just do "string(pips)" will do.

 
Thank you