We have created live DataFeed where _load() returns 1 min live candle.
This data is being used in the strategy's next(self).
The issue is if the signal is generated for a candle in next() then notify_order() is called after receiving next candle. This is causing 1 candle delay in live trading as we are placing order to broker from notify_order().
Scenario:
- _load(self): - Returns 1 min candle at 9:30
- next(self) - Strategy creates Buy signal for 9:30 candle.
- notify_order(self, order) - Places order after getting 9:31 candle.
Are we missing anything? Kindly guide.