With the Tradeworx program, the agency will gain access to every bid to buy stocks and every offer to sell shares on each of the nation’s 13 public exchanges. The system, akin to an X-ray machine for the stock market, could enable regulators to detect whether trading firms are overwhelming the market’s plumbing when they rapidly submit and cancel orders.