Hi all,
I'm trying to implement a function to cancel partially filled order at the end of day, using schedule_function(). The source code is attached. If I don't include the cancel function, according to the transaction detail, the order will be partially filled on the first day and then fully filled on the second day. However, after I include the cancel function, no transactions even occurred while my expectation is the order should be partially filled on the first day and no transaction occurred on the second day... So what's problem here? And if I want to implement the functionality following my expectation, what should I do?
Thanks.