Hi,
In some cases Floating P/L and Max Exposure don't get reset to zero, and they show their previous values.
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.
Floating P/L and Max Exposure doesn't get reset when all positions are closed
Floating P/L and Max Exposure doesn't get reset when all positions are closed
- Attachments
-
- EURUSD_2_again.zip
- (118.38 KiB) Downloaded 224 times
Re: Floating P/L and Max Exposure doesn't get reset when all positions are closed
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.
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 218 times
-
- Posts: 259
- Joined: Tue Feb 22, 2022 11:06 am