It all depends what do you mean by "foreign". If you mean people that doesn't lives there and buys from abroad that is more reasonable. It will be an outrage if he just banned Muslims (whenever they live in the states or not), for example. The first is a measure to stop speculation and help people to get a home. The second is just a xenophobic populist measure that solves nothing.