how can i have my algorithm issue orders at a given point in time, in the past?

context: i'd like to test a strategy by feeding it a timeseries of data and letting it make orders. these orders have to happen at some point in time. i'm confused about how to specify when in time an order should be issued.

for example, if we have data for the month of May, and the algorithm is able to make trades every day, how do i specify that a trade is being requested for May 5th and not May 6th?

ideally i'd like to be able to consider a learning model - in this case the model should "observe" the backtest data sequentially, issue an order, and "evaluate" its performance on future backtest data. i'm confused about how to achieve this in QC.