So basically I want to simultaneously short two things and keep the dollar value of each of those two shorts as close as possible to $50k because they hedge each other. But I also want to minimize trading fees so I want it to only trade when the difference from the target exceeds 200 shares. I'm sure I could hack it up with the IB API in a day but I wonder if anyone has already written something like that, or if there is already some hidden feature in TWS to do that?
