TimeActivationRules which allows me to place an order that has a stop loss, a take profit and a market expiring order. For example, if a SL or a TP isn’t hit within 30 minutes, we close out the trade. Is there any way to do this within Tradovate? I don’t want to have to be checking the order times manually to close out the trade when it hits a certain time.
So I think I would want an OSO that triggers an OCO which has 3 criteria:
Trade starts with an open limit order with an expireTime.
If filled:
A stop-loss, a Take Profit and a time activated market order to close the trade. I’m thinking activationTime for that market order?
Once your primary order is placed, the SL and TP are created in a suspended state. Once the primary order is filled, they change their state to Working.
You cannot change the type of the TP from limit to market order. So you either have to flatten your position or change the limit order to be at the current price and wait for it to get filled.
You do not want to close this position with your own market order since you will have 2 positions at the same time and could get a RiskRejected. The TP and market order could also be filled at the same time causing lots of edge conditions in your code.