Shouldn t unrealised profit be in profit (or at least not negative) at a higher price than the starting price in a grid bot?
Answer
Oh i get it i tought you were asking why the total profit is negative
This is how your bots already running, kind of but close to
It start on 248, price fluctuates so that it makes grid profits, but it reach higher price , maybe something like 270 or 280. Since your buy order from 280 down to 251 is not sold yet, this bought token is containing negative unrealized profit for you (it bought higher than current price)