@Giacomo said in Turtle strategy - boolean error:
closes = []
You are using closes = [] as a global variable. You need to move this into the init as:
self.closes = list()This will make it a local variable to the Strategy class. Then change all the closes in next to self.closes.
I made this change and it works fine.
You may wish to consider using self.datas[0].close.get(ago=1, size=??) instead of min(self.closes[-self.params.interval - 1:-1])
Or even better setting up local_min/local_max as indicators in init using bt.ind.MaxN and bt.ind.MinN