((Sell Price*100000)-(Buy Price*100000))*Exchange Rate
So for example, if I'm exchanging EURGBP and I buy at 0.85427 and sell at 0.85481 with an exchange rate of 1.24785 USD per GBP, my profit should be roughly $67.38. To use the formula:
((0.85481*100000)-(0.85427*100000))*1.24785 = 67.3839
This is consistent with the account PnL shown in the Accounts tab.
But my problem is how do I get the exchange rate? I have been searching and haven't been able to find any methods that I can call to obtain the exchange rate for use in that formula. How can I obtain the exchange rate so my strategy can correctly track PnL? If there is no method for obtaining the exchange rate, how are people accurately tracking PnL in their strategies?
Comment