In this article, you will learn about the calculation behind the Total PNL value for an active bot and how to read your bot results.

As an example, let's take one of our running bots on the 1INCH/USDT pair, where 1INCH is the base currency, and USDT is the quote currency. The bot generates profit in quote currency, i.e., USDT. Total PNL is also estimated in USDT.

The price of the 1INCH coin is 0.587 USDT (marked by an arrow); this price will be used to calculate Total PNL.

Bot results and parameters

Invested funds’ Value = 6548.36 USDT

Bot profit = 299.64 USDT (4.58%)

Unrealized profit = -235.04 USDT

Total PNL = 64.6 USDT (0.98%)

Bot profit - realized profit that comes from the execution of buy and sell orders. It's already added to your balance.

Unrealized - profit or loss from the change in the base currency price.

So, to calculate the Total PNL, we can sum the Unrealized value with the generated Bot profit value:

-235.04 USDT + 299.64 USDT = 64.6 USDT (Total PNL)

Thus, while the bot was working, the initial investment changed by 64.6 USDT or 0.98%.

To calculate the Bot profit % as a separate metric, we use the following formula: Invested funds’ value + Bot Profit.

6548.36 USDT (Initial investment)

+ 299.64 USDT (Bot profit)

= 6848 USDT (+4.58%)

This is the real bot profit.

Bot current assets are used to place orders, some of which are placed in base currency 1INCH (SELL orders), while others in quote currency USDT (BUY orders). That's why if you plan to sell base currency for quote currency when closing the bot, we recommend taking Total PNL into account, as it considers the current price of the base currency.

The balance used in open orders

To find out how much of each coin is currently held in open orders by this bot, let’s refer to the Current funds' section:

From the picture above, we can see that we have a total of 4879.1 1INCH in open SELL orders and 3457.99 USDT in open BUY orders.

Calculating Total PNL

Let’s calculate the Total PNL value and compare it to the Bot Profit:

Bot Profit of 299.64 USDT will remain the same. However, the Total PNL indicator takes into account the current price of the base currency that is held in open orders, and this price will change constantly.

If we want to close the bot from our example selling 1INCH for USDT at the immediate market price, some profit would be lost because of the 1INCH price change and how the balance of the base and quote currency is currently distributed between open orders. At the same time, generated profit covers some loss of the value change of the base currency, resulting in the Total PNL being positive.

To sum up, if you want to sell your base currency for quote currency, you might want to wait until the Total PNL increases. You could also use a Take Profit tool, which closes the bot automatically and sells base currency when Total PNL reaches a certain value (learn more about Take Profit Bot Feature).

Did this answer your question?