We have an algorithm implemented using IB's TWS API where in we have 2 different programs to take care of LONG and SHORT. Both the programs actually enter the trade by executing entry order and placing exit order as a limit or stop loss order.
for Ex:- the program which takes care of LONG will first enter trade buy executing a buy order and then it places 2 sell orders one as a LIMIT order and another as stop-loss order. Executing one of them will cancel the the other order automatically(OCA-one cancels ALL order).Now we got to know about how we can implement OCA orders manually in quantopian.The problem now is with the 2 separate programs.Can we really have 2 different programs running at the same time? Quantopian allows it?
In IB we can get the pending orders and position details that is created by one program in another i.e if our LONG handling program creates a pending order and when we request for the pending order from SHORT handling program it will return us the pending orders that are created by SHORT handling along with those pending that are created from LONG handling program.Briefly telling it will just return all the pending orders in the system. So is this possible in quantopian?