Is there a way in TWS that I can prevent myself from making trades that cause my cash balance to go negative?

Übersicht: 

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.