Calculate number of pips correctly

 

I have an indicator that detects all trading activity on my account and then sends an email. I have an issue though in that when i close the positions the pips are not calculated correctly.

This is the line on my MQL script that calculates the pips. In  the picture it gives a pip count of 491 pips where it should read either just 49 pips or 49,1 pips(preferable)


  string pips = StringFormat("%s%.0f pips %s", dealProfit >= 0 ? "+" : "-", (MathAbs(dealPrice - orderPriceOpen) /_Point), dealProfit >= 0 ? "profit" : "loss"  );


Reason: