Anyone whose built a trading system lives with this type of fear on a daily basis.
Write your risk system first and your algo second.
> The cause? A coder had mistakenly programmed a router to send placeholder bids as live orders. If not for the good graces of the options exchanges, the bank would have lost $500 million, according to the U.S. Securities and Exchange Commission. Cancellations and price adjustments reduced that to $38 million
And this is at the top of my things that are unfair in the markets. Knight Capital wasn't bailed out by the exchanges for the same thing and it bankrupted them. Goldman with its alumni every where.... was.