Is it possible from within CommInfoBase's getcommission method to determine the timestamp/prices of the trade that commission request is being applied to? Or would I need to that externally, e.g maybe I could assume that getcommission is always called after next() if I log the timestamp there? I don't know if that call flow is always like that though which might break that approach?
For some context, I'm attempting to use this approach to account for the BID/ASK spread for Forex which I understand Backtrader isn't really designed for. My plan is to use the commission request to lookup the Spread for the given trade point from another Pandas dataframe, then merge that spread into the commission. I think this should work ok, it just needs the Time and OHLC that getcommission is being applied to?
Thanks for any help.