You can't sell more than you have, hence, you can't put both take profit and stop-loss at same time on the whole amount.
What the bot does in order to mimic the behavior of putting both of the orders to protect your position is to monitor the price and replace between the take profit and stop loss when needed.