Not able to close all trades due to freeze limit

When I use tsl.cancel_all_orders() to exit all trades, some orders don’t go through if they are above the freeze limit. Because of this, I’m not able to close all positions at once.

Is there any method to exit all trades in one go, even if some are above the freeze limit? Maybe by auto-splitting them or something?

Thanks.