massachusetts
Posts: 7 since Oct 2013
Thanks Given: 2
Thanks Received: 1
|
Hello,
I went live for the first time today on a strategy I have been developing (after much sim account testing) and I ran into a problem when my strategy submitted an order. The order was rejected and immediately crashed my strategy.
The reason (it appears right now at least) the order was rejected was because it tried submitting an order size that violated my accounts "precautionary settings" on my brokers side. So I have increased that limit and I hope things will play out as planned tomorrow.
The question I have is, what sort of error handling should I think about when placing orders so my strategy will not crash on a rejected order or something similar? Standard try/catch block is clearly what I am going to wrap it in now but is there any other reference of specific error codes I can account for? Also any other suggested areas to insert try/catch blocks that otherwise would not have had a problem in regular sim account testing?
Thanks!
|