How would I code an on balance volume indicator in python? It wouldn't work for me in python. And how would I get the standard deviation of that, or make bollinger bands of it? This is what im trying to do:

 self.spyobv= self.OBV("SPY", 20, Resolution.Daily);
self.meanobv=self.np.mean(self.spyobv)
 self.stdobv= self.np.std(self.spyobv)
 self.upper=self.meanobv+self.stdobv