Trader builds $5 billion position after realizing he wasn't using test program, but brokerage says he can't keep his profit