Floating P/L and Max Exposure doesn't get reset when all positions are closed

Post Reply
Khan
Posts: 137
Joined: Wed Feb 22, 2023 10:21 am

Floating P/L and Max Exposure doesn't get reset when all positions are closed

Post by Khan »

Hi,

In some cases Floating P/L and Max Exposure don't get reset to zero, and they show their previous values.
floating pl.png
floating pl.png (87.79 KiB) Viewed 578 times
A position was just closed by price hitting my TP. I don't have any open positions, nor I have any pending orders, but Floating P/L and Max Exposure are not 0; they are showing some previous value.

Since this bug happens only some of the time, I'm attaching the backtest file. The backtest is at the same place as the screenshot above. I'm not sure what causes it; a sudden spread spike might be a reason.
Attachments
EURUSD_2_again.zip
(118.38 KiB) Downloaded 69 times
Khan
Posts: 137
Joined: Wed Feb 22, 2023 10:21 am

Re: Floating P/L and Max Exposure doesn't get reset when all positions are closed

Post by Khan »

Hello,

I found another bug with Max Exposure: When closing a part of a position, Max Exposure doesn't get recalculated.

In the attached backtest, I have an open position which was opened with 0.5% risk and Max Exposure was showing it correctly. Then I manually closed 50% of it twice, but neither time Max Exposure changed - it is still showing 0.5%.

I think Floating P/L was adjusted correctly each time but I'm not sure because I was concentrating on Max Exposure.

While you are fixing this, I suggest that you also look at what happens with a position that has multiple TPs set (on order creation) when one of the TPs are hit & filled - it might have the same bug.

Thanks.
Attachments
EURUSD_2_again.zip
(212.65 KiB) Downloaded 72 times
NakedMarkets
Posts: 248
Joined: Tue Feb 22, 2022 11:06 am

Re: Floating P/L and Max Exposure doesn't get reset when all positions are closed

Post by NakedMarkets »

Hello,

Thanks again for your report. This refresh bug has been fixed in the latest release.
Post Reply