I don't think that this is the only thing you are missing. To initialize the value is very easy:

def nextstart(self): self.l.f1[0] = 0.0

But here is couple other items to correct:

you call undefined variables such as self.f1 or self.pf - this is the main reason of the error returned this in the next() self.v3 = bt.ind.Lowest(self.pf, period=self.p.length) self.v4 = bt.ind.Highest(self.pf, period=self.p.length) - self.v3

and then

.... self.v3[0] .... .... self.v4[0] ....

doesn't work.