There isn’t a function in TWS that prevents account holders with margin accounts from making trades that cause their cash balance to become negative, which would then incur interest charges for a margin loan. Traders would want to ensure that their cash balance always remained positive or open a cash account. Negative cash balances are disallowed in cash accounts and orders that would cause the cash balance to go negative should be rejected by the system.