Hello EveryBody,

I am training IAs with Tensorflow to determine optimal trading strategies by seconds slices but there are some dark points that I don't understand in the API.

When I place an order with SetHoldings in OnData Event : At which time of the Algorithm is the Trade filled in BackTest with DataSlices ? Is it filled right away or at the end of the OnData Method and before the next OnData? Is it :

OnData Begin(data slice) ===> order place ===> OnData End ===> order filled ===> On data(next data slice) ?


OnData Begin(data slice) ===> order place ===> order filled ===> OnData End ===> On Data(next data slice) ?


OnData Begin(data slice) ===> order place (independently of which slice) ===> OnData End ===> OnData(next data slice)

So in the last scenario, the order is filled indepedently of which Data Slice I'm In, so the faster my strategy construction is, the faster I can place an order. In that case, if I determine a strategy for this second to the next and the strategy calculation is longer than 1 second (if Data Slices are 1 second), the order is pointless...

Thanks It would help a lot