Margex
فارسی
فارسی
  • Margex
    • Ⓜ️Margex چیست؟
    • 📜گزینه های معاملاتی
      • 1️⃣جفت ارزهای قابل معامله و اهرم
      • 2️⃣Trade Fees and Funding
      • 3️⃣جوایز
      • 4️⃣کد تبلیغاتی
    • 🚀ثبت نام، واریز، شروع!
  • واریز و برداشت
    • ↘️سپرده ها
      • 1️⃣چگونه واریز کنید
      • 2️⃣شرایط سپرده گذاری
      • 3️⃣چگونه بیت کوین با کارت اعتباری خریداری کنیم (خرید ارز دیجیتال با کارت بانکی)
    • ↗️برداشت ها
      • 1️⃣چگونه برداشت کنید
      • 2️⃣شرایط برداشت
    • 🖥️بررسی قسمت کیف پول
  • مبدل
    • ↕️نحوه تبدیل ارز رمزنگاری شده
    • 📊هزینه‌ها و شرایط
    • 📄تاریخچه تبدیل
    • ❔سوالات متداول مبدل (سوالات متداول)
  • راهنمای معاملات با اهرم
    • ⚖️اهرم و مارجین برای ترید کردن
      • 1️⃣Liquidation. Margex Anti-Liquidation Protection
      • 2️⃣Profit & Loss (PnL) and How It's Calculated
      • 3️⃣Return on Equity (RoE) and How It's Calculated
    • 🖥️معامله رابط
    • 🛒پوزیشن های و سفارش‌های
      • 1️⃣انواع معاملات
      • 2️⃣نحوه ثبت و مدیریت سفارشات
      • 3️⃣نحوه مدیریت پوزیشن های باز
      • 4️⃣Cross Margin and Isolated Margin: Differences explained
  • هشدارهای قیمت
    • 🔔نحوه تنظیم هشدارهای قیمت
  • Copy Trading
    • 👥کپی ترید چیست؟
    • 🧑‍🎓Followers
      • 1️⃣Choosing the Ideal Strategies: Tips & Key Indicators
      • 2️⃣شروع سریع برای دنبال کنندگان چگونه دنبال کردن یک استراتژی را شروع کنیم
      • 3️⃣چگونه دنبال کردن یک استراتژی را متوقف کنیم؟
      • 4️⃣فالوور پورتفولیو
    • 👨‍🏫Traders
      • 1️⃣شروع سریع برای معامله گران. چگونه استراتژی خود را ایجاد کنید
      • 2️⃣چگونه استراتژی های خود را مدیریت کنید
      • 3️⃣تنظیمات استراتژی
    • 📈نرخ بازگشت سرمایه استراتژی. شاخص های سود و عملکرد
    • 💸پاداش. رده های سود دهی دنبال کنندگان و توزیع سهم سود
  • استیکینگ
    • توضیحات مربوط به استیکینگ
      • 1️⃣(APY) چیست و چگونه محاسبه می شود
      • 2️⃣Advantages of Staking on Margex
      • 3️⃣Staking Pool Limits
    • چگونه استیک کنید و از استیک خارج کنید
    • آمار استیکینگ و ماشین حساب درآمد
    • افزایش APY%
  • Market making (MM)
    • چگونه یک بازارساز شویم
    • تعهدات مارکت میکرها
    • شرایط معامله برای بازارسازها
  • عمومی
    • 🔐Account Security
      • 1️⃣2FA
      • 2️⃣Reset Password
      • 3️⃣اعلان های ایمیل
    • 💬پشتیبانی مشتری
  • برنامه معرفی
    • 🤝نحوه کار برنامه ارجاع
    • 🖥️رابط کاربری قسمت پارتنرشیپ
  • Terms
    • Terms of Service
    • Privacy Policy
    • Cookie Policy
    • Copy Trading Terms
    • Staking Terms
    • Affiliate Terms and Conditions
Powered by GitBook
On this page
  1. راهنمای معاملات با اهرم
  2. اهرم و مارجین برای ترید کردن

Profit & Loss (PnL) and How It's Calculated

Profit and Loss (PnL)indicator reflects the Profit or Loss of a deal. PnL is calculated in two different ways, depending on if a deal is still currently open or if it has already been closed.

PreviousLiquidation. Margex Anti-Liquidation ProtectionNextReturn on Equity (RoE) and How It's Calculated

Last updated 1 year ago

The Profit and Loss (PnL) indicator reflects the Profit or Loss of a position. PnL is calculated in 2 different ways, depending on if a position is still currently Open or if it has already been Closed.

For open positions Realized PnL and Unrealized PnL are taken into account. The potential profit from the deal refers to the Unrealized PnL. Realized PNL in open positions equals already paid commissions (i.e. ).

  • PnL is not reflected in Open positions. It can be calculated by adding Realized PnL + Unrealized PnL.

  • Calculating Unrealized PnL of Open positions requires the use of AskPrice and BidPrice, while calculating Unrealized PnL of Closed positions requires the use of ClosePrice

Below are examples of calculation of PnL in Open Positions and in Closed Positions:

How to calculate PnL in OPEN positions

The general formulas for calculating PnL of OPEN positions:

PnL = Realized PnL + Unrealized PnL, where:

  • Realized PnL = - OpenOrderCommission - Funding

  • Unrealized PnL (Long) = SizeUSD * Multiplier * (BidPrice - OpenPrice)/OpenPrice

  • Unrealized PnL (Short) = SizeUSD * Multiplier * (OpenPrice - AskPrice)/OpenPrice

Note: CloseOrderCommision is NOT included in PnL until a position has been closed.

EXAMPLE:

Parameters of an OPEN position: Open position, 0.01 BTC, opened with Limit order, Long, OpenOrderCommission, Funding charged 1 time.

First, we must calculate the OpenOrderCommission and Funding:

  • OpenOrderCommission = SizeBTC * MakerFee = 0.01 * 0.001 = 0.00001

  • Funding = SizeBTC * FundingFee = 0.01 * 0.005 = 0.00005

Next, must calculate Realized PnL and Unrealized PnL:

  • Realized PnL = OpenOrderCommission - Funding = -0.00001 - 0.00005 = - 0.00006

  • Unrealized PnL (Long) = SizeUSD * Multiplier * (BidPrice- OpenPrice)/OpenPrice = 100 * 0.0001 * (11000 - 10000)/10000 = 0.001

Finally, the last step is calculating PnL. As seen above, the Realized PnL= 0.00006 and Unrealized PnL = 0.001;

  • PnL(Long) = Realized PnL + Unrealized PnL = -0.00006 + 0.001 = 0.00094

How to calculate PnL in CLOSED positions

The general formulas for calculating PnL of CLOSED positions:

PnL = Realized PnL + Unrealized PnL - CloseOrderCommission , where:

  • Unrealized PnL (Long) = SizeUSD * Multiplier * (ClosePrice- OpenPrice)/OpenPrice

  • Unrealized PnL (Short) = SizeUSD * Multiplier * (OpenPrice - ClosePrice)/OpenPrice

  • CloseOrderCommission = TakerFee * SizeBTC

EXAMPLE:

Parameters of a CLOSED position: Сlosed position, opened at Market, closed at with a Market order, Long, Funding charged 1 time

Firstly, we must calculate the CloseOrderCommission:

  • CloseOrderCommission = TakerFee * SizeBTC = 0.002 * 0.01 = 0.00002 Secondly, we must calculate Realized PnL and Unrealized PnL:

  • Realized PnL = OpenOrderCommission - Funding = -0.010.002 - 0.010.005 = -0.00007

  • Unrealized PnL (Long) = SizeUSD * Multiplier * (ClosePrice - OpenPrice)/OpenPrice = 100 * 0.0001 * (11000-10000)/10000 = 0.001 Thirdly, the final step is calculating PnL. As seen above, the Unrealized PnL= 0.00006 and Realized PnL = 0.001:

  • PnL = Realized PnL + Unrealized PnL - CloseOrderCommission = - 0.00007 + 0.001 - 0.00002 = 0.00091

The PnL for open and closed positions is calculated automatically and reflected in the Open Positions and Position History sections of the page for your convenience.

⚖️
2️⃣
trade fees and funding
Trade