but uncommenting the reference to the [-1] comparison to [-2] leads to the following error:
self.datas - data feed # 1 from all N data feeds added
self.datas[-1] - data feed # N from all N data feeds added
self.datas[-2] - data feed # N-1 from all N data feeds added
This is how python list indexing works.
if you use only one data feed than evidently self.datas[-2] doesn't exist. Also if single data feed is added than self.datas == self.datas[-1].
I would recommend you to start reading the docs. It will save your time and help to understand the bt.