This operation is not allowed in Initialize or during warm up: OrderRequest.Submit. Please move this code to the OnWarmupFinished() method.
 

What is the meaning of this error? Do I need warmup in Initialize? The self.smaWin[0].Value is called in OnData.


def Initialize(self):

res = Resolution.Minute
self.spySMA = self.SMA("SPY", 200, res)
self.spySMA.Updated += self.SmaUpdated
self.smaWin = RollingWindow[IndicatorDataPoint](2)       
self.SetWarmUp(200, res);