How Unrealized P&L Changes Margin and Liquidation: Cross vs. Isolated
The green +$300 on screen is not settled money yet. Nevertheless, the exchange includes it in calculations, increases order capacity, and adjusts liquidation levels. Understanding when it counts helps avoid an account becoming riskier while showing a profit.
Unrealized P&L Enters Account Calculations
Unrealized P&L estimates the result of closing an open position now. It cannot yet be withdrawn, but in a futures account it is a calculation input, not merely a display. This distinction causes confusion.
Balance = Deposits + Realized P&L − Fees − Funding.
Unrealized P&L = Quantity × (Current price − Entry), for a long.
Equity = Balance + Unrealized P&L.
Liquidation and order capacity use equity, not balance alone.
Unrealized P&L moves equity, which affects available margin and liquidation. The strength and scope of that relationship depend on the margin mode.
Cross Margin: Unrealized P&L Immediately Joins Equity
In cross mode, the account acts as collateral and unrealized P&L enters equity in real time. Even small price changes can visibly alter order capacity.
Locked initial margin = 3,000 ÷ 20 = $150.
Price 62,000 → Unrealized +$100.
Equity 1,100; available ≈ 1,100 − 150 = $950.
Price 58,000 → Unrealized −$100.
Equity 900; available ≈ 900 − 150 = $750.
A 3.3% price move produces $200, about 21%, of order-capacity variation.
Liquidation follows the same principle. It occurs when equity falls below maintenance margin, where declining equity meets the required-maintenance line.
Equity = 1,000 + 0.05 × (P − 60,000).
Maintenance = 0.05 × P × 0.5% = 0.00025P.
1,000 + 0.05P − 3,000 = 0.00025P
0.04975P = 2,000
Liquidation P ≈ $40,200, or −33%.
The 20× setting appears nowhere in that equation. Cross liquidation depends on equity and notional; leverage sets only the $150 locked margin. See the liquidation calculator and maintenance margin rate guide for detailed tier calculations.
Adding with Unrealized Profit Brings Liquidation Upward
Cross unrealized profit immediately provides order capacity. It looks like buying more with earned money, but actually increases exposure against unsettled collateral. Suppose the account above reaches 66,000 and +$300 unrealized, then adds the same quantity.
Before: 0.05 BTC; average 60,000; liquidation about 40,200, or −33%.
After: Add 0.05 BTC at 66,000 → Total 0.1 BTC.
Average = (60,000 × 0.05 + 66,000 × 0.05) ÷ 0.1 = 63,000.
Equity = 1,000 + 0.1 × (P − 63,000).
Maintenance = 0.1 × P × 0.5% = 0.0005P.
1,000 + 0.1P − 6,300 = 0.0005P
0.0995P = 5,300
Liquidation P ≈ $53,270.
Liquidation rises from 40,200 to 53,270,
an increase of about $13,000.
Balance remains $1,000. Only notional increased, while liquidation distance shrank from 33% to 19%. Using every bit of unrealized-profit capacity can make the account more fragile as price rises. An ordinary retracement endangers the original entry too. Structurally, this resembles averaging down, but in the opposite direction.
To use profit more safely, reverse the sequence: first realize part of it into balance, then calculate new quantity from settled funds. See position sizing.
Isolated Margin: Unrealized P&L Stays Within Its Boundary
Each isolated position has separate margin, and unrealized P&L stays inside that boundary. It does not automatically affect another position's liquidation or the whole account's capacity.
A: BTC long; margin $150; unrealized +$300.
B: ETH short; margin $150; unrealized −$140.
Cross: Combined unrealized +$160; A helps support B.
Isolated: A's +$300 does not rescue B.
B liquidates independently as its own $150 margin is exhausted.
Isolated mode both contains a position's losses and prevents its profits from protecting another position. Unrealized gains do not automatically become order capacity; using them requires partial realization or manually adjusting the position's margin.
Likewise, isolated unrealized losses reduce only that position's margin. The rest of the balance remains outside, and liquidation limits loss to allocated margin. Understanding leverage also explains why lowering isolated leverage effectively adds money inside the boundary.
Three Differences from Realized P&L
Treating the displayed amount as money already earned creates discrepancies at settlement.
Unrealized P&L usually uses mark price; actual closing execution uses market quotes.
② Fees Are Not Yet Deducted
$3,000 notional; round-trip taker fee 0.1% → −$3.
③ Funding Is Not Yet Deducted
0.01% every eight hours over 24 hours:
3,000 × 0.03% = −$0.9.
Displayed unrealized +$100 → Actual remainder ≈ 100 − 3 − 0.9 = $96.1.
The first difference is especially relevant to narrow-target scalping. Mark price combines exchange indexes and can differ by a few dollars from the last execution on your venue. With a 0.3% target, that is material. Check final figures including fees in the P&L calculator.
The third difference accumulates in long-held positions. Unrealized P&L can remain green while balance gradually falls because funding leaves the balance at each settlement.
What If Equity Becomes Negative?
A sharp decline can delay liquidation execution until equity falls below zero. The exchange's insurance fund covers the deficit. If that is insufficient, auto-deleveraging forcibly reduces profitable opposite positions. Even without taking a loss yourself, a large unrealized-profit position can be closed during widespread liquidations.
These mechanisms keep most retail accounts from carrying negative balances, but the tradeoff is that unrealized profit may be realized without your choice. That is another reason not to build plans around unsettled gains.
Key Points
② Isolated: It stays within the position and neither rescues another position nor automatically creates capacity elsewhere.
③ Both: Displayed unrealized P&L omits fees and funding and generally uses mark price.
Base quantity calculations on settled balance rather than equity inflated by unrealized gains. Spending all rising capacity can bring liquidation closer as profit grows. To use profits for the next entry, close part first, realize them, and recalculate from the settled amount.
NOONOO TRADING invites you to follow live trading in our free chat.
Start in the bot📈 OKX trading fee discount for new registrations
Register for the OKX Fee Discount →