LogoLogo
Go to Rails.xyzRails ProRails PlayContact Us
  • GENERAL
    • The Rails Platform
    • Competitions
    • Security
  • GETTING STARTED
    • Signup
      • Signup for Individuals
      • Signup for Businesses
    • Rails Pro Requirements
      • Know Your Customer (KYC)
      • Know Your Business (KYB)
        • Business Document Requirements
        • KYC Requirements for Businesses
        • Certification of Documents
      • Certification of Documents
      • Prohibited Jurisdictions for Rails Pro
    • Trading Page Overview
    • Portfolio Page Overview
    • Trading Metrics Guide
    • Chart Settings Guide
    • Block Explorer
  • DEPOSITS & WITHDRAWALS
    • Required Tokens & How to Get Them
      • Securing USDT for Rails Pro
      • Securing STABLE for Rails Play
    • Connecting Your Wallet
    • Deposits & Withdrawals
  • Changing Your Wallet
  • Troubleshooting Tips
  • TRADING
    • Order Types
    • Placing Orders
    • Leverage and Liquidation
    • P&L Calculator
    • Funding
  • Index Price Sources
  • SUPPORT
    • FAQ
      • What is Perpetual Trading?
      • How Do I Get Help With the Platform?
      • Why is my Rails Pro Application Not Approved?
      • Why Isn't My Order Going Through?
      • How to Select a Limit Price
      • Why Can't I Change my Leverage?
      • How do I Earn Rewards?
      • Why are my Deposits Disabled?
      • StableMEME FAQ
  • Join us on Discord
  • Contact Us
Powered by GitBook

© Copyright 2025 Rails Limited

On this page
  • Definitions
  • Calculations
  • Profit & Loss Calculations
  • Balance Calculations
  • Margin Calculations
  • Leverage & Liquidation Calculations

Was this helpful?

  1. GETTING STARTED

Trading Metrics Guide

PreviousPortfolio Page OverviewNextChart Settings Guide

Last updated 3 days ago

Was this helpful?

This article explains common metrics on the Rails platform, including their precise calculations.

Definitions

Symbol
Meaning

Entry Price: The index price at time of position open.

Average Price: The weighted average entry price of all trades that make up the (open) position, including any additional buys or sells made over time.

Exit Price: The index price at time of position close (only for realized P&L).

Profit & Loss: How much in USD gained (profit) or lost (loss) compared to the entry price and position size.

Quantity: The position size in units of the asset (e.g. 0.01 BTC).

Trading Fees: Total entry and exit fees in USD.

Funding Payments: (positive or negative)

Realized P&L: The P&L realized so far. For an open order this contains the P&L from partially closing a position.

Calculations

Profit & Loss Calculations

The realized and unrealized P&L calculations varies for long and short trades. Unrealized P&L represents the profit or loss if the position were closed at the current moment. When a position is closed, the realized P&L is calculated and added to the P&L in the Account Summary. The Unrealized P&L value in the account summary is the total of all positions' unrealized P&L.

Realized P&Llong=(Pexit−Pentry)×Q−F+U\text{Realized P\&L}_{\text{long}} = (P_{\text{exit}} - P_{\text{entry}}) \times Q - F + URealized P&Llong​=(Pexit​−Pentry​)×Q−F+U

Balance Calculations

This Available Balance is the amount you have available to place new trades. It remains static unless you open or close positions, realize profits or losses, or deposit or withdraw funds.

The Account Balance is the current, total balance of your account including both available balance and balance in trades. This consistently changes if you have open positions, as the index price of the assets you’ve traded against fluctuates.

Margin Calculations

Margin is calculated as the combined value of all open positions and active open orders, divided by the selected leverage (1x to 5x). This amount, which is held as collateral from your available balance, ensures you have enough funds to support both existing and potential future trades.

Maintenance Margin is the minimum amount of collateral required to keep your open positions active and avoid liquidation, calculated as a percentage (the safety margin, see below) of the total balance of all open positions.

Leverage & Liquidation Calculations

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.

Account Leverage reflects the total size of your open positions relative to your available margin, 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.

The Liquidation Price is the index price at which a position will be liquidated. It is the maximum absolute index price permitted to maintain a non-negative account balance, and is calculated slightly differently for Long and Short positions as shown below.

Index Price: The fair market value of the asset pulled from our .

Realized P&Lshort=(Pentry−Pexit)×Q−F+U\text{Realized P\&L}_{\text{short}} = (P_{\text{entry}} - P_{\text{exit}}) \times Q - F + URealized P&Lshort​=(Pentry​−Pexit​)×Q−F+U
Unrealized P&Llong=(Pindex−Pentry)×Q+R\text{Unrealized P\&L}_{\text{long}} = (P_{\text{index}} - P_{\text{entry}}) \times Q + RUnrealized P&Llong​=(Pindex​−Pentry​)×Q+R
Unrealized P&Lshort=(Pentry−Pindex)×Q+R\text{Unrealized P\&L}_{\text{short}} = (P_{\text{entry}} - P_{\text{index}}) \times Q + RUnrealized P&Lshort​=(Pentry​−Pindex​)×Q+R
Available Balance=Depositstotal−Feestotal−Margin+P&Lrealized, total+Fundingtotal\text{Available Balance} = \text{Deposits}_{\text{total}} - \text{Fees}_{\text{total}} - \text{Margin} + \text{P\&L}_{\text{realized, total}} + \text{Funding}_{\text{total}}Available Balance=Depositstotal​−Feestotal​−Margin+P&Lrealized, total​+Fundingtotal​
Account Balance=Depositstotal−Feestotal+P&Lrealized, total+P&Lunrealized, total+Fundingtotal\text{Account Balance} = \text{Deposits}_{\text{total}} - \text{Fees}_{\text{total}} + \text{P\&L}_{\text{realized, total}} + \text{P\&L}_{\text{unrealized, total}} + \text{Funding}_{\text{total}}Account Balance=Depositstotal​−Feestotal​+P&Lrealized, total​+P&Lunrealized, total​+Fundingtotal​

Due to the complexity of funding, it's calculations have a dedicated article which can be found .

Margin=Total Positions+Total OrdersLeverage\text{Margin} = \frac{\text{Total Positions} + \text{Total Orders}}{\text{Leverage}}Margin=LeverageTotal Positions+Total Orders​
Maintenance Margin=Total Positions×Safety Margin\text{Maintenance Margin} = \text{Total Positions} \times \text{Safety Margin}Maintenance Margin=Total Positions×Safety Margin

The Margin Rate is the proportion of the total balance of all open positions that must be held from your available balance as collateral when opening a position. It’s the reciprocal of .

Margin Rate=1Account Leverage\text{Margin Rate} = \frac{1}{\text{Account Leverage}}Margin Rate=Account Leverage1​

The Safety Margin is the percentage of your total position value you must keep as margin to avoid . It's a standard 3% buffer which is added to account for market volatility and slippage.

Effective Leverage=Total Position ValueTotal Available Balance\text{Effective Leverage} = \frac{\text{Total Position Value}}{\text{Total Available Balance}}Effective Leverage=Total Available BalanceTotal Position Value​
Liquidation Pricelong=Pavg×(1−(1Account Leverage)+Safety Margin)\text{Liquidation Price}_{\text{long}} = P_{\text{avg}} \times \left( 1 - \left( \frac{1}{\text{Account Leverage}} \right) + \text{Safety Margin} \right)Liquidation Pricelong​=Pavg​×(1−(Account Leverage1​)+Safety Margin)
Liquidation Priceshort=Pavg×(1+(1Account Leverage)−Safety Margin)\text{Liquidation Price}_{\text{short}} = P_{\text{avg}} \times \left( 1 + \left( \frac{1}{\text{Account Leverage}} \right) - \text{Safety Margin} \right)Liquidation Priceshort​=Pavg​×(1+(Account Leverage1​)−Safety Margin)

Visit for a more in-depth explanation of leverage and liquidation.

PindexP_{\text{index}}Pindex​
Pentry\text{P}_{\text{entry}}Pentry​
PavgP_{\text{avg}}Pavg​
Pexit\text{P}_{\text{exit}}Pexit​
P&L\text{P\&L}P&L
QQQ
FFF
UUU
RRR
here
liquidation
this article
account leverage
Index Price sources
Account Leverage=max⁡(Total PositionsTotal Account Balance,1)\text{Account Leverage}=\max\left( \frac{\text{Total Positions}}{\text{Total Account Balance}}, 1 \right)Account Leverage=max(Total Account BalanceTotal Positions​,1)
Safety Margin=Transaction Fee+Liquidation Fee+Slippage Buffer=0.1%+1%+1.9%=3%\begin{align*} \text{Safety Margin} &= \text{Transaction Fee} + \text{Liquidation Fee} + \text{Slippage Buffer} \\ &= 0.1\% + 1\% + 1.9\% \\ &= 3\% \end{align*}Safety Margin​=Transaction Fee+Liquidation Fee+Slippage Buffer=0.1%+1%+1.9%=3%​