[Essential for Newbies] The PNL Calculation

Why does the PNL still show negative when my entry price is lower than the current price?

When users start grid trading for the first time, most of them will find it confusing when their entry price is lower than the current market price, but the PNL for the running bots still shows negative.


To begin with, we need to figure out two basic concepts:

PNL=(base currency current price - average buying price)*base currency units of holding 

Entry price: the first filled order price when running the bot


The PNL is not simply comparing the entry price and current market price. The key to the calculation lies in “Average Buying Price”. Let’s take XXX/USDT trading pair as an example to show you how the system works. 


(The whole process when the price fluctuates)


Entry Price for XXX/USDT: 3 USDT 

Price range: 3-10 USDT 

Price difference per grid: 1 USDT 


When the bot just created:

The current price for XXX/USDT is 3 USDT. At this time, the average buying price is 3 USDT, and we apply the above formula. The PNL is exactly 0 now. 


When the bot is running for a period of time:

Assuming that the price for XXX/USDT goes up from 3 USDT to 10 USDT, and after that, falling back to 4 USDT. Let’s take a closer look at what the bot has done for us within this period. 

When the price rose from 3 USDT to 10 USDT, the bot will be completing the sell order at 4 USDT, 5 USDT, 6 USDT, 7 USDT, 8 USDT, 9 USDT and 10 USDT respectively to take the profit. Immediately after the price drops to 4 USDT, the bot will execute the buy order at 9 USDT, 8 USDT, 7 USDT, 6 USDT, 5 USDT and 4 USDT.

It will be easier for us to calculate during the whole process of price dropping, the average executed buying price is 6.5 USDT, which is higher than the current market price of XXX/USDT. Naturally, the PNL is negative now. 

Now, it’s clear that the PNL is not simply comparing the entry price and the current market price, the bot will calculate the average buying price and the PNL when the market is volatile. 

Was this article helpful?
3 out of 3 found this helpful



Article is closed for comments.