Expiration Time on Pending Orders vs. Live Executed Orders
-
I've been backtesting a strategy that uses a simple buy/sell pending order block with an order expiration time so I can tune an input of minutes to cancel an order that has not yet filled in a given amount of time.
In the backtests this executes correctly only killing pending orders and leaving filled orders in that time amount to run with their intended logic. However, running the strategy live on Demo however the expiration time seems to be closing filled orders as well at the expiration time (not just pending orders).
Is there a way to only have this block kill pending orders and not live orders that have filled?

-
Figured out a workaround. Just posting for future search helpfulness for someone else. I left the expiration set in minutes as you see above in post one and then I used a new for each trade modify expiration block so that every trade that fills automatically kills the expiration and sets it to "no expiration" and problem solved.
Cheers.

-
@daedalus Thank you for sharing.