Backtrader Community

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. malro
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    malro

    @malro

    0
    Reputation
    46
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    malro Unfollow Follow

    Latest posts made by malro

    • RE: line info lost during resampling

      @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.

      posted in General Discussion
      M
      malro