Stock Option Spreads Retaining Legs in Interactive Brokers

wayum999

Active member
Joined
May 26, 2020
Posts
26
Likes
5
Hello again

I am trying to write a strategy that submits a market order for a vertical option spread, so as an example, the purchase of 100 put options of SPY at the strike of 363, and the selling of 100 put options at the strike of 364. This is straightforward to make this purchase, however, I noticed there doesn't seem to be a way to have these two transactions be legs of a parent order.

It is not as important for the initial transaction; however, I want to set a limit order upon execution of this first order based on the price of the vertical spread, IE 50% more or less than the entry price (which in a spread is the difference of the bought and sold options. I know this can be done and calculated within MW, and at a point you can have another set of market orders placed at the time your calculation meets your requirements. They problem with this is that if MW for some reason gets disconnected or goes down on my computer, I then will not make the trade and potentially miss the moment. Instead, it would be much safe to have the limit order placed immediately following the initial trade with Interactive Brokers with two legs to close, and the limit price being the spread between the two.

Another option I was pondering was potentially having MW interact with Interactive Brokers' Trader Work Station java sample code. Does anyone have any experience with intermingling for a purpose such as this? Any help is greatly appreciated, and if it would take contracting someone, that would be fine as well, I really just want to find a possible solution to this dillema.

Thank you.
W
 
Top