Somewhat related to OP's requirements, i.e., placing orders after certain time in market. ?
How do you do it in TWS (not API)? ?I can't seem to find conditional orders in TWS doing that.
I am thinking about a simple execution like this, using swigibpy (Python C++ API wrapper):?
if PRICE > High of first 5 min candle:
Buy AMT shares of XXX when XXX goes above PRICE
else
Buy AMT shares of XXX when XXX goes above High of the first 5 min candle
# attach stop loss and scaling
Stop Loss AMT of XXX at Stop_loss_price
Listen to market data for the holdings in the portfolio
Sell AMT/2 shares of HOLDINGS when HOLDINGS appreciates 2%
Trailing Stop?HOLDINGS