@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.close > self.datas.close[-1]: print(self.datas.close) print("Yep") else: print(self.datas.close) print("Nope")
This works fine.
date = self.datas.datetime.date() print(date)
This too. But-
if self.datas.datetime.datetime == self.datas.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 ? I'm getting the below when I try to do so:
TypeError: 'method' object is not subscriptable
Thanks in advance.