FX Rate used to calculate profit

 

Hi,

I want to export my account history but I am not able to find a way to calculate the FX Rate used to calculate Profit (which is in Deposit currency).


My account deposit currency is EUR.

Lets say I buy 1 share Apple at 500.

I sell it at 550. The profit is 50USD. The profit columns is showing 42 EUR (EURUSD about 1.19). 

Not sure if anyone came across, but is there a way/MQL5 function to get the ExchangeRate used to convert the profit into deposit currency?