Closed windowshopr closed 3 years ago
I just added some more examples of order types in the samples folders. Hopefully, they help you out. :)
As for your order, I think that would work. Your best bet is to try it with the paper account and see if the behavior is what you expect.
Wicked! I think I can work with the added samples! Thanks a lot!
Hey!
I just discovered your repo and YouTube video series. Excellent work! I'm looking to use your application to build my strategy using Interactive Brokers.
What I am a bit confused about, is how to create "custom" types of orders. The IB API docs are confusing and don't really highlight what I'm after. (I typed out a request form on their website and hit "Send" where I was then greeted with a "Something went wrong, please try again later" error message eye roll). I'm thinking this might be better served here anyway as I'm hoping we might discover some new order types to add to your examples/samples to help others!
To keep things simple, I'll pseudocode what the order I'm looking to create should look like:
I assume one could make some kind of bracket order, just leaving the Take Profit stuff blank as it's not needed in this case? Some potential issues I see with this above order might be:
1) Is it even possible to trigger a Buy Limit order with Trailing SL order like this? 2) If it is, if the order only gets a partial fill before exceeding the limit price (say only 56 shares get filled), can the Trailing SL be fitted to sell the entire position, regardless of the share size?
Looking at the sample for limit orders included in this repo's docs, and this webpage, I would envision it should look something like:
I noticed there might be something to do with defining the transmit attribute too, which is not included above (as I have no clue what I'm doing yet XD)