Incorrect PnL for reversed futures position

Hello everyone :waving_hand:

I took the following long CRUDEOIL trade using API:

Entry date,Exit date,Instrument,Direction,Buy price,Sell price,Quantity,Trade P/L
2026-02-03 20:00:18,2026-02-05 20:00:14,CRUDEOIL,LONG,5671.0,5747.0,1,7600.0

The buy price 5671 was confirmed by both my API program and Dhan Journal:

The overall trade was profitable but after reversing the position the buy price was incorrectly shown in positions page as 5891 causing the entire position (now SHORT) to be shown as huge loss:

The same incorrect position PnL was shown in the web interface too, though there was no option to view the details like in the app that I could find. :magnifying_glass_tilted_left:
My current hypothesis is that the app’s incorrect buy price is the brought forward price of the contract, because at some point this trade was more profitable - but such a PnL is of no use to me and I guess most traders. :smiling_face_with_tear:

1 Like

This continues to happen with new positions. :face_exhaling:
Please acknowledge bug🐞

@Mohseen_Usmani @RahulDeshpande @Hardik

1 Like