That's a great explanation. However, remember there are many, many details on how this is done especially where the orders are placed relative to the current "print" or market price.
Great spoofers implement a "layering" algo that places the orders at different levels in the DOM.
This is really...