@backtrader it seems that doesn't work now. Custom filter should be added after Resampler filter which always return True.
From the sources of feed.py:
for ff, fargs, fkwargs in self._filters:
# previous filter may have put things onto the stack
if self._barstack:
for i in range(len(self._barstack)):
self._fromstack(forward=True)
retff = ff(self, *fargs, **fkwargs)
else:
retff = ff(self, *fargs, **fkwargs)
if retff: # bar removed from systemn
break # out of the inner loop
And that means that no filters will be executed after Resampler.
So, what is the right way to resample custom lines?
Thanks.