Buying power is defined as the cash/dollar amount available for trading in the account.
For unrestricted cash accounts, buying power includes your settled cash + unsettled cash (all buy trades are debited, and all sell trades are credited from the cash available to the trade balance as soon as the trade executes, not when the trade settles).
For cash accounts restricted due to good faith violations, the buying power will not include the unsettled cash amount of sale proceeds.