Quote from gigi:
So I will have a second independent little process which will also connect to the same trading account and monitor simple things, like ensuring the total net position does not go over a certain limit, or that there are no more than N orders in 10 minutes for example, or more than M positions open simultaneously.
Good plan, I am an experienced coder but still had an obscure scenario last year where my code flipped a contract 200 times at market costing $10k. Needless to say, I put in place an "N orders in 10 minutes" type filter.