Isolated margin:
Est. Liq Price for Long position: (OpenValue - assignedPosBalance - mmAmount)/(0.9994 - MMR)/size
Est. Liq Price for Short position: (OpenValue + assignedPosBalance + mmAmount)/(1.0006 + MMR)/size
assignedPosBalance=Openvalue/leverage + close fee
close fee=bankruptcy Value*takerfeerate
let's see the example below:
OpenValue=500x0.4x1=200
assignedPosBalance=200/5+ (200-200/5)x0.06%=40.096
(200-40.096-0)/(0.9994-0.01)/500=0.3232...
*Actual liquidation price can differ from the value of the unrealized loss at entry.
Under cross-margin mode, the positions in the same settlement currency will be liquidated based on the Margin Level {Margin Level = Position Equity / Maintenance Margin}. When the margin level reaches 100%, liquidation will be triggered.
In cross mode, Position Equity = Contract Account Balance + Total Cross Unrealized PNL - Total Isolated Position Margin - Order Used