Code for calculation of pip difference of open trades

 

Hello

As there is clearly only one correct answer to the question, 'How many pips of profit does my current trade exhibit?', I'm interested to see the most efficient way of coding this.

I could work this out from reading, but I'm concerned about missing a vital point, and wondered if someone would open their coding treasure trove for me.  If not, I will post what I find to donate to the community.

Many thanks IA

M

This is a good start: http://www.fxtrademaker.com/fx_calculation.htm

 
Please do a search here on the forum. That question has been asked and answered a "gazillion" times before (and in so many variations)!!!
Reason: