The breakeven price definition is straightforward: the price you would need to sell the base currency that the bot is holding to break even. In other words, it's the price at which your initial value equals the current value of the bot. Now let's review a few nuances to understand better what's happening behind the scenes and what we could expect in different scenarios.
The general formula is
break-even price = (initial value in quote - current quote quantity - profit* value in quote) / current quantity of base
*Exchange fees are excluded (accounted for) in profit calculation.
And to better understand what this means, let's go over an example.
Let's say you set up a bot for BNB/BUSD. Let's use some easy numbers for the sake of calculation:
Base = 1 BNB
Quote = 100 BUSD
Initial BNB price = 300 BUSD
In this case our initial value = 1 * 300 + 100 = 400 BUSD
Then the bot went to work, and after some time, we have the following funds:
Base = 0.5 BNB
Quote = 175 BUSD
Profit = 100 BUSD
By definition, the breakeven price is the price at which the initial fund's value equals our current fund's value, so we get the formula:
400 BUSD (initial value) = 0.5 BNB * X BUSD/BNB (breakeven price) +175 BUSD (current quote balance) + 100 BUSD (bot profit)
Breakeven price = (400 BUSD - 175 BUSD - 100 BUSD) / 0.5 BNB = 250 BUSD/BNB
In other words, if you were to sell 0.5 BNB at 250 BUSD/BNB, your current funds would equal your initial funds, breaking even. Selling at any price over 250 BUSD/BNB will make you a profit.
It's essential to notice that the breakeven price is dynamic. As the bot generates profit, the breakeven price decreases over time. However, that doesn't mean it can get lower only. If the value of the base falls, the breakeven price can increase, especially at the beginning when there isn't much profit generated.
To follow the previous example, let's say that when we calculated the breakeven price of 250 BUSD/BNB, the current price is 290 BUSD/BNB. If we stopped the bot at that moment and the price dropped to 250 BUSD/BNB, then we could sell and break even. However, if the bot were working during the drop, it would keep adding BNB to the balance as the price drops; hence the breakeven price would increase.
The breakeven price can be negative if the current quote balance and profit values are more than the initial value, so no matter at which price you sell the base, you would be making a profit. In that case, the breakeven price will show 0 in the price chart.