@knothere that oracle dataset has loaded a bit odd but i was just following along, tried to apply to something ive been building, i swear its something like i named csv heading wrong or something f1eccb5c-9a60-4a1f-beeb-1d738cb19303-image.png
@matt-wilson recently solved this problem, but I think it could be caused by many reasons. In my situation, I used open which is a future data when buying and I changed to close and solved. I think may be you can review your strategy. It might be an idea mistake rather than code.
This annoying error means that Pandas can not find your column name in your dataframe. Before doing anything with the data frame, use print(df.columns) to see dataframe column exist or not.
I was getting a similar kind of error in one of my codes. Turns out, that particular index was missing from my data frame as I had dropped the empty dataframe 2 rows. If this is the case, you can do df.reset_index(inplace=True) and the error should be resolved.
@backtrader In chinese future market, sessionstart is 21:00 and sessionend is 15:00 next day. So, you see sessionstart is indeed larger than session end. Can backtrader process this situation correctly?