Hi, I would like to do a simple order automation. When market open, enter at market price with a stoploss level everyday. Settle all positions right before the market everyday. What i am developing is, 1) send out a market order several minutes before market open so that the system will help me to fill this order when market open 2) after filling the order, i can got the filled price then i set my stoploss level based on this filled price, and send out a stoploss order However, i don't know how to ask system to help me to flat my position (i call this flat order) 1 minute before market close. Also, two problems will be arised 1) if stoploss order is filled within the day, how to ask system to help me to cancel/disable this flat order? 2)if stoploss order is not filled, then the flat order will be filled 1 minute before market close. for this case, how to ask system to cancel/disable the stoploss order? appreciate if anyone can tell me a simple way to do so! thanks!