Hi guys,

I am experimenting with Forex trading and I struggle to understand how P/L for a given trade is calculated.

In the blackest attached, I have setup a simple algorithm example that enter a long EURJPY position with a USD denominated account on a moving average cross signal and exit after a 5% movement in EURJPY price. I have included a counter to limit the example to one single trade (Entry + Exit) over the period so it is easy to understand what is happening.

I got two questions:

 

1) I would expect my P/L in USD on that trade to be:

P/L =  USD received at Exit  - USD paid at Entry

= (_ExitPrice x _Quantity x _ExitConversionRate) - (_EntryPrice * _Quantity * _EntryConversionRate)

= -$2,481.5 Loss for the attached backup

However, QuantConnect shows a $2,304.97 Net Profit for that trade. What am I getting wrong?

 

2) After the trade has been closed, I would expect the account Equity in USD to remain perfectly flat at the Starting Equity + Realised P/L = $ 102,304.97 level. However, you can see the Strategy Equity continue to slightly fluctuate every day after the trade has been close. How come is that?

 

I would really appreciate someone shading some light on those questions.

Many thanks

Author