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
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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();