Pip Calculator in MQ5

 
I have found Pip Calculator in MQ4: https://www.mql5.com/en/code/12418 . I need the same thing in MQ5 and with any currency pair. For calculation of any currency pair there are as if three cases described in picture attached.  Can anybody help?
Simple Pip Value Calculator
Simple Pip Value Calculator
  • votes: 23
  • 2015.02.13
  • Stuart Browne
  • www.mql5.com
"How much is a 1 pip movement on EURUSD (or any pair) worth in my currency?" - here's the answer!
Files:
 
  1. In code
    • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
    • Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
    • Do NOT use TickValue by itself - DeltaPerLot
    • You must normalize lots properly and check against min and max.
    • You must also check FreeMargin to avoid stop out
  2. Use a GUI: Indicators: 'Money Manager Graphic Tool' indicator by 'takycard' Forum - Page 5
Convert to MT5
 
I did MQL5 program for calculating pip sizes. Symbols are in array, if anybody wants to change, add e.t.c. If anybody is able to understand my code and answer is that code correct it will be appreciated. If to compare result of that program with existing pip calculators it seems similar, but who knows?
Files:
 
was looking for that one. does it work correctly or you have a better version?
Reason: