Taiwan told foreign investors to exit bets on the local dollar, taken through exchange-traded funds, as a 12% gain in its currency threatens its economy and companies.