I am implementing Hekin Ashi strategy in python i want to fetch previous bar data in Update function and also seed recursive value to ha_open

```

def Update(self, input, lastBar):
        self.atr.Update(input)
        if self.atr.IsReady:
            self.o  =  input.Open         ## Open price
            self.h  =  input.High         ## High price
            self.l  =  input.Low          ## Low price
            self.c  =  input.Close        ## Close price

            #lastBar.Open

            self.ha_close = (self.o + self.h + self.l + self.c) / 4.0
            self.ha_open = (self.lastBar.Open + self.lastBar.ha_close) / 2.0

```

when i try to fetch self.lastBar.ha_close its giving error also i want to feed ha_open recursively

as i did in backtrader

self.ha_open = (self..ha_open(-1) + ha_close(-1)) / 2.0 def prenext(self): # seed recursive value self.l.ha_open[0] = (self.data.open[0] + self.data.close[0]) / 2.0