The $5 trillion-a-day foreign exchange market is changing rapidly, as electronic execution platforms control the bulk of trading and bank dealers streamline operations in response to growing pressure from regulators to cut trading risks and boost capital.