The configuration (Margin or not) of the account used with Interactive Brokers is not controlled by backtrader.
The backtester doesn't have a limitation. See what for example Interactive Broker offers you with the leverage with some assets:
- Futures: no leverage - either you have the money in the account for the guarantee or you can't operate
- Stocks: leverage - but market dependent
- Forex: greatet leverate as with stocks
From that simple view with just 3 different assets it should be clear that it is not the account what has the leverage but the assets (obviously there are accounts which doesn't offer leverage for any asset)
And that's the reason for the design of the internal broker. Blindly offering leverage for any asset type would simply mean that someone would be testing for example futures with the illusion that leverage is available, or forex with the limitations of the leverage applied to stocks.
As such, the proper way to do it is to make sure each asset gets the associated cash deduction level from the commission scheme applied to it.