Simple pip calculation

 

I've found this be a simple way to calculate pips without concern of digit variations between JPY and other pairs.   Also, the spreads are taken into consideration for a more accurate view of how many pips you've actually earned.

numberOfPips = OrderProfit() / LotSizes();

 

P H: I've found this be a simple way to calculate pips without concern of digit variations between JPY and other pairs.   Also, the spreads are taken into consideration for a more accurate view of how many pips you've actually earned.

numberOfPips = OrderProfit() / LotSizes();

My apologies to your efforts, but that is simply invalid.

Firstly OrderProfit() returns a money value in account currency, so dividing it by the number of lots simply returns the profit per lot in money value.

Secondly, the function OrderProfit() is only valid for MQL4.

 
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Reason: