@run-out Much appreciated, this is very useful. Can easily compare previous close, vol, time, etc. That said, for some reason I'm getting an error when trying to compare the date of each candle. Would you happen to know what I'm doing wrong here? Please see below example.
if self.datas[0].close[0] > self.datas[0].close[-1]:
print(self.datas[0].close[0])
print("Yep")
else:
print(self.datas[0].close[0])
print("Nope")
This works fine.
date = self.datas[0].datetime.date()
print(date)
This too. But-
if self.datas[0].datetime.datetime[0] == self.datas[0].datetime.datetime[-1]:
print("Yep")
else:
print("Nope")
Here I'm unable to compare the date of one candle to another, unlike with the close which I can do. It's due to not being able to put it in an array [0]? I'm getting the below when I try to do so:
TypeError: 'method' object is not subscriptable
Thanks in advance.