realized/unrealized PnL with leverage

Sequence Side Quantity   @ Price
1.       Buy    10       @ 1,0  (with leverage of 50)
2.       Sell   10       @ 1,2  (inherits the leverage of 50?)


Imagine that this trade is a CFD or a forex with USDEUR. I use a leverage of 50 for buy. How should I include this leverage within my PnL calculations?

Is this the right formula:

PnL  = quantity * (ExitPrice * exitLeverage - EntryPrice * entryLeverage)


Question:

Do I need to multiply the entry or exit prices by the leverage at all, or does the broker already returns the trades with the "leveraged prices"?