No, the funds are not available for reinvestment until the prior trade settlement has completed. If you are trading U.S. stocks with T+2 settlement time, that means trade date plus two business days, e.g. if you execute a transaction on a Monday, the funds will settle two days later, on Wednesday. Charles Schwab has a web page describing what sorts of account violations can occur if you do transactions with unsettled sales of securities transactions.
Let's apply this to your example. You have a brokerage account with $8000 in it. You buy $4000 of one stock, and sell that stock for $4100, one hour later. You cannot buy $6000 of another stock the same day. You can buy $4000 of another stock the same day (well, almost, after accounting for any trading commissions). You will need to wait two days for the $4100 of funds from the sale transaction to clear before that money is available to use for trading.
For stocks in the U.S., the transition from T+3 to T+2 happened in September 2017.
Foreign exchange transactions work the same way. Spot forex transactions are also T+2 with the exception of these currency pairs, which settle in T+1: USD/CAD, USD/TRY, USD/PHP, USD/RUB, USD/KZT and USD/PKR.