Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
order rejected - strategy crashes - what kind of exceptions
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!
Can you help answer these questions from other members on NexusFi?
I should have added that I am currently submitting orders in the unmanaged approach. I am thinking(hoping) I will be fine from here on out, so mostly just curious if any others have ran into similar problems I should account for.