diff --git a/pnl_correction.sql b/pnl_correction.sql new file mode 100644 index 0000000..0536fd9 --- /dev/null +++ b/pnl_correction.sql @@ -0,0 +1,25 @@ +-- Manual P&L correction for trades with wrong entry/exit data +-- Nov 23, 2025 - Verified against Drift UI screenshot + +-- Trade 1: cmibdii4k0004pe07nzfmturo (9 minutes ago) +-- Was: +$6.44 profit (wrong exit price) +-- Correct: -$59.59 loss (SHORT, price went UP from $128.729 to $130.167) +UPDATE "Trade" +SET + "entryPrice" = 128.729, + "exitPrice" = 130.167, + "positionSizeUSD" = 5173.00, + "realizedPnL" = -59.59 +WHERE id = 'cmibdii4k0004pe07nzfmturo'; + +-- Trade 2: cmiahpupc0000pe07g2dh58ow (2 hours ago) +-- Was: LONG with -$22.41 loss +-- Correct: SHORT with +$31.45 profit (price went DOWN from $128.729 to $128.209) +UPDATE "Trade" +SET + direction = 'short', + "entryPrice" = 128.729, + "exitPrice" = 128.209, + "positionSizeUSD" = 7756.00, + "realizedPnL" = 31.45 +WHERE id = 'cmiahpupc0000pe07g2dh58ow';