As per the IB Controller 1.3.8 README, I can place a bracket order using something similar to the following:
parentID = ibc.PlaceOrder("MSFT", "BUY", 1000, "LMT", 27, 0, "GTC", False ); ibc.PlaceOrder("MSFT", "SELL", 1000, "LMT", 28, 0, "GTC", False, 100, "", parentID ); ibc.PlaceOrder("MSFT", "SELL", 1000, "STP", 26, 26, "GTC", True, 100, "", parentID );
Is it possible to somehow place the price of the STP order relative to the actual entry price of the parent order, instead of at an actual absolute value (so set stop size, not stop price)? For example, for the code above, it if MSFT opens at 26.99, my stop will be 0.99, but if MSFT opens at 26.10, my stop will only be 0.10.
As an EOD trader, how I have dealt with this in the past was that I place a "dummy" stop which is the limit entry price less the stop size, and then after the first trading day, I modify that "dummy" stop to the real stop price (based on Actual entry price - stop size). However I just had a stock enter and exit on the same day as the price intraday fell through the dummy stop price, but it would not have fallen through the actual entry price - stop size. I'm wondering if it is possible somehow to set the stop size, using IB Controller, rather than Stop price?
I am aware that I could do this pretty simply by having IB feed the actual entry price back to me as soon as it happens (instead of EOD) and then use this to modify the stop price, but I'm an EOD trader and I don't want to have IB TWS and AB open during trading hours. I've seen @Tomasz compare a beginner auto-trading to a child given a machine gun on another post. I would say I'm a teenager with a bit of shooting experience, who feels comfortable with a rifle (running my code once a day to place and modify orders when market is closed, then checking orders before transmitting manually). I'm not ready for my machine gun (having everything running full time while market is open).