Hello everyone i just took a strategy from quantpedia where they apply pair trading using SMA, instead of using SMA i would like to replace it with a Boilinger band, the idea would be stock1-stock2=spread and initialize boilinger band as: self.Bolband = self.BB(self.spread, period_BB, 2, MovingAverageType.Simple, Resolution.Hour)

 

But im having some trouble to initialize the boilinger band any ideas on how to fix it??

 

Thanks