Trading Metrics Guide
This article explains common metrics on the Rails platform, including their precise calculations.
Definitions
Pindex
Index Price: The fair market value of the asset pulled from our Index Price sources.
Pentry
Entry Price: The price at which your order was filled to open a position. This is based on actual execution price and may differ from the index and order book price at the moment you placed the order due to factors like slippage or partial fills.
Pavg
Average Entry Price: The weighted average fill price for the position, calculated as:
Pavg=QPositionValue
Pexit
Exit Price: The price at which your order was filled to close a position. This reflects the actual execution price and may differ from the index and order book price you saw when closing your position due to factors like slippage or partial fills.
P&L
Profit & Loss: How much in USDT gained (profit) or lost (loss) compared to the entry price and position size, where:
P&Lu = Unrealized P&L
P&Lr = Realized P&L
S
Position Side: The side of your position, where:
Slong=1
Sshort=−1
Q
Position Quantity: The position size in units of the asset (e.g. 0.01 BTC).
F
Trading Fees: Total entry and exit fees in USDT.
U
Funding Payments: Positive or negative. Learn more here.
D
Deposits: Amount of USDT deposited to your account
W
Withdrawals: Total USDT withdrawal volume
L
Leverage: The per-market leverage used, between 1x - 5x.
V
Notional Position Value
M
Margin: the portion of your funds set aside to support a trade. It acts as collateral for open positions and open orders, where:
Mp,cross=Cross Postition Margin = margin locked by your open cross margin positions
Mp,iso=Cross Postition Margin = margin already allocated to all isolated positions
Mtotal,openorders=Total Open Order Margin = margin reserved for all open, unfilled orders
Mreq=Margin Required = Margin Required to keep your positions open
Mexcess=Excess Margin = Margin available to place orders. Only excess margin is withdrawable.
Calculations
Profit & Loss Calculations
Unrealized P&L
Unrealized P&L reflects the profit or loss if a position were closed at current market prices, with values changing in real-time. The account summary displays the total unrealized P&L for all positions.
P&Lu=(Pindex−Pavg)×S×Q
Note: Unrealized P&L is calculated using the index price, not the order book price.
Realized P&L
Realized P&L reflects the profit or loss realized through closed positions. Once a position is closed, the realized P&L is computed and added to the Account Summary.
P&Lr=(Pexit−Pentry)×S×Q−F+U
Value Calculations
Notional Value
Notional Value is the the current market value of your position based on the index price:
Notional Value=Pindex×Q
Position Value
Position Value is the the total notional value or exposure of your trade, determined by the entry price used when you opened the position:
Position Value=Pentry×Q
Balance Calculations
Available Balance
Available Balance is the amount you have available to place new trades, and fluctuates as the market moves. Margin calculations can be found here.
Available Balance=Cross Margin Equity−Cross Position Margin−Total Open Order Margin
Total Balance
Total Balance is the settled cash value of your account. It represents your actual money after all completed (realized) events have been factored in, but before accounting for any live, ongoing trades.
Total Balance=Dtotal−Wtotal+P&Lr,total−Ftotal+Utotal
Withdrawable Balance
Withdrawable Balance represents the portion of your account balance that can be withdrawn. Note that the margin locked for open positions and orders, as well as unrealized losses from open positions, reduces what you can withdraw. To increase your withdrawable balance, you should partially or fully close an open position with positive unrealized P&L to realize profits.
Withdrawable Balance=Total Balance+∑(min(0,(Pindex−Pentry)×Q×S))−∑(Pentry×LQ)−Open Order Margin
where:
Total Balance=Dtotal−Wtotal+P&Lr,total−Ftotal+Utotal
Cross-Margin Balance
Cross-Margin Balance is the base balance available for your cross margin pool. It represents your settled total balance minus any collateral that has been strictly isolated and locked for isolated margin positions.
Cross-Margin Balance=Total Balance−Isolated Position Margin
Equity & Margin Calculations
Account Equity
Account Equity is the current live balance of your account. This changes dynamically when you have open positions, as the index price of the assets you’ve traded against fluctuates impacting your unrealized P&L.
Account Equity=Total Balance+P&Lu,total
where:
Total Balance=Dtotal−Wtotal+P&Lr,total−Ftotal+Utotal
Cross-Margin Equity
Cross-Margin Equity represents the total value of your shared collateral pool, which dynamically fluctuates based on the performance of your open cross margin positions.
Cross-Margin Equity=Cross-Margin Balance+P&Lu,total
Unrealized PnL is aggregated across all open cross margin positions. Because it fluctuates with the market, your cross margin equity is continuously updated.
Isolated Position Equity
In Isolated Margin Mode, each position has it's own dedicated margin pool, and excluded from the cross-margin pool. Isolated Position Equity is then calculated as:
Isolated Position Equity=Isolated Position Margin +P&Lu,position
Maintenance Margin Ratio (or MMR)
Maintenance Margin Ratio (or MMR) is a fixed 5% buffer added to all positions for market volatility and slippage.
MMR=0.05
Maintenance Margin
Each open position requires a minimum amount of equity to remain open, referred to as Maintenance Margin. The maintenance margin is calculated per position:
Maintenance Marginposition=V×MMR
Total Maintenance Margin
In cross-margin, the Total Maintenance Margin is the sum of maintenance margins across all open positions.
Total Maintenance Margin=∑Maintenance Marginposition
Available Margin
Available Margin is the total of funds currently available to support your open positions after accounting for required margin. It represents the buffer your position still has before liquidation risk increases.
Margin Available = Account Equity - ∑(Maintenance Margin)
Position Margin & Open Order Margin
Position Margin is the margin calculated per open position based on the current index price, and influenced by your selected leverage (1x - 5x). Open Order Margin is calculated in the same way for each open order, as these also will impact your available collateral.
Position Margin=Pindex×LQ
Required Margin
Required Margin is the minimum collateral that must stay locked to keep your position open at your current size, price, and leverage.
Mreq=Pindex×LQ
Excess Margin
Excess Margin is the extra collateral above the required margin that you can remove (isolated) or withdraw (cross) without immediately breaking the minimum margin needed to keep the position open.
Mexcess=Mp,iso−Mreq
Leverage & Liquidation Calculations
Visit this article for a more in-depth explanation of leverage and liquidation.
Effective Leverage
Effective Leverage is the actual leverage applied to an open position. It may differ from the leverage you initially selected due to changes in your available balance caused by index price movements, fees, or margin adjustments between order placement and trade execution.
Effective Leverage=Total Available BalanceTotal Position Value
Cross Leverage
Cross Leverage reflects the total size of your open positions relative to your margin available, showing how much risk you are taking across all trades combined. It aggregates the effective leverage from all open positions into a single number, showing your total risk exposure.
Cross Leverage=Account BalanceTotal Positions
Cross-Margin Ratio
Cross-Margin Ratio measures overall account health — what percentage of account equity is consumed by minimum margin requirements across all open positions.
Cross-Margin Ratio=Account EquityTotal Maintenance Margin
< 100%
Healthy
≥ 100%
Liquidation triggered - all positions closed
Liquidation Price
Liquidation Price is the index price at which liquidation may occur:
Where Available Margin is dependent on Margin Mode Used:
In Cross-Margin: Available Margin=Cross Margin Balance−Total Cross Maintenance Margin
In Isolated Margin: Available Margin=Isolated Position Equity−Maintenence Marginposition
Note: If the liquidation price of your position is less than or equal to zero, no liquidation price is displayed.
FAQ's
Index Price vs Order Book Price
Understanding the difference between the index price and the order book price is crucial for traders. Each is employed in different trading calculations, and this distinction is a common source of confusion, particularly when slippage happens. By comprehending these differences, traders can better estimate their trading performance.
Index Price
The Index Price is a benchmark price calculated from a basket of major exchanges. Instead of reflecting just Rails’ order book, it represents a fair, averaged market value of the asset across multiple venues.
Order Book Price
The Order Book Price is the real-time price at which trades are executed on our platform. It is calculated using the current best bid (buy orders) and best ask (sell orders) from the order book.
When you place a market order, it is filled against the best available prices in the order book.
This ensures instant execution, but depending on liquidity and your order size, the final fill price may be higher or lower than the last traded price you saw as a result of slippage.
The following table details when and why one price is used over the other:
Liquidation
Liquidation occurs when the your liquidation price crosses the index price. This prevents traders from being unfairly liquidated due to thin liquidity or a price spike in the order book.
Funding Payment Calculation
Both: the funding mechanism aims to balance deviations between the order book price and the index price, so both are considered.
Trigger Orders
Stop loss orders and take profit orders are triggered using the index price. This avoids premature order execution due to thin liquidity or a price spike in the order book.
Order Execution
Once the trigger condition is met, the order itself is executed against the order book price (just like any other market or limit order).
Unrealized P&L
Unrealized P&L is calculated using the index price, not the order book price, to provide a fair and stable view of your postion's value.
Why does the average price change?
Average Price: The Average Price shown in your account is the adjusted weighted average entry price of all trades that make up your currently open position.
How it works
When adding to a position, each new buy or sell that increases your position size is included in the weighted average. This ensures your entry price reflects the combined cost of all open trades.
When partially closing a position:
The system books any realized profit or loss (PnL) on the portion you closed.
It also deducts applicable trading fees (and, if relevant, funding charges).
The average entry price of the remaining open position is then recalculated so that the unrealized PnL you see stays consistent with your actual exposure.
Why your Average Price may change
Because realized PnL and fees are factored into the recalculation, your displayed average price may shift slightly after a partial close — even if your execution prices haven’t changed. This adjustment is accounting-based: it does not mean you actually bought higher or lower, but rather that the platform is aligning your remaining position’s entry with the PnL already realized.
Last updated
Was this helpful?

