Why Does My Wallet Balance Decrease When the Order is Profitable?
During quantitative trading, you may wonder why your order shows a profit while your balance is decreasing. Have you noticed that when the wallet balance decreases, the margin balance usually increases? This is primarily because the quantitative system introduced the partial profit-taking function in 2022, and the quantitative system and the exchange calculate gains and losses differently. Let's use an example to explain:
Suppose we have a single order with an average holding cost of 100 USDT and a position size of 10 contracts.
If the current price is 80 USDT, the account loss is:
(80 - 100) × 10 = -200 USDT
At this point, if the quant trading system determines that additional positions should be added (for example, 2 more contracts), the total position becomes 12 contracts.
After some time, if the price rises to 85 USDT, the 2 contracts that were added now show a profit and will be closed. At this point, the calculations differ as follows:Quantitative Trading System Calculation
2 contracts × (85 - 80) = 10 USDT
This individual trade is calculated as a profit of 10 USDT
The remaining 10 contracts show a loss of:
(85 - 100) × 10 = -150 USDT
The total account balance is:
Profit from closed trade (10) + Unrealized loss (-150) = -140 USDTExchange Calculation Method (Different Approach)
At 85 USDT, holding 12 contracts, the total loss is:
(85 - 100) × 10 + (85 - 80) × 2
= -150 + 10
= -140 USDT
When closing 2 contracts, the exchange proportionally allocates the loss:
(-140) × (2/12) = -23.3 USDT
This appears as a reduction of 23.3 USDT in the wallet balance.
The remaining 10 contracts show a loss of:
(-140) - (-23.3) = -116.7 USDT
The total account balance is:
Realized loss (-23.3) + Unrealized loss (-116.7)
= -140 USDTAs you can see, the total account balance is the same in both cases—only the method of calculating the loss differs.
The key difference is that the quantitative trading system calculates the profit and loss of each individual trade upon entry and exit. According to our strategy, each trade exits when it reaches an appropriate profit level, which is fundamental to how the system operates.
For the 2 contracts added at 80 USDT and closed at 85 USDT, the system treats this as a profitable trade and exits accordingly.
The exchange, however, takes a different approach. It doesn't calculate position losses in batches. Instead, whenever positions are closed, the loss is proportionally distributed across all contracts.
When the entire position is finally closed, the profit and loss calculations from both the exchange and the quant trading system will match.
We hope this explanation helps you better understand how our quant trading system works.
The system is always evolving, continuously striving for improvement.
::: Disclaimer This document is a guide for software usage and does not constitute investment advice. All registration, account opening, and trading decisions are made at the user's own discretion and risk. :::