Do pending orders get cancelled if doing a multi day simulation? If yes, how to carry them over?

I'm carrying out a multi-day simulation and need some specific orders to get carried over. From the pending orders function, its clear, limit orders are not being carried over. How to carry these orders over?

Comments

  • ptunneyptunney Posts: 246

    You will lose any pending orders at the end of your simulation time.
    So if you set the end time to market hours then they would end at the end of market hours.
    If you set your end time to 8pm then they would end at 8pm.
    Limit orders sent on the live system are automatically cancelled at some point between 6pm and 8pm depending on the route the order takes to market.
    I would suggest that you run your backtest until 6pm, at 5:50pm I would collect all your pending order info and store in in a dictionary or a file. Then on start up the next day I would read it back in and put the limit orders back out. Obviously it depends on your system but I would recheck that the order makes sense.

Sign In or Register to comment.