Hi everyone,

I am trying to build a simple futures backtest that ranks and go long/short commodities by their Log Return every n month.

I am able to get the backtest to work but now I am running into two issues that I think might be related:

  1. All my orders are being filled at stale price
180627_1669842279.jpgEnter on 2010-07-01 but price is from 2010-06-30

2. Occasionally there is no price for a contract:

180627_1669842465.jpgNo price for KE14H12 even though it is mapped to a continuous contract

I searched for some possible explanations in the forum and it seems like I am trying to place an order at the same time the data slice is emitted which prevents the order to get to the latest data. 

I'm not sure how to go about fixing this yet, so would really appreciate any help/guidance