Skip to content

Commit

Permalink
Fix initial renko bricks (mementum#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikgrygiel authored Jul 3, 2020
1 parent a3744d9 commit 5266c9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backtrader/filters/renko.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def nextstart(self, data):
o = data.open[0]
o = round(o / self.p.align, 0) * self.p.align # aligned
self._size = self.p.size or float(o // self.p.autosize)
self._top = int(o) + self._size
self._bot = int(o) - self._size
self._top = o + self._size
self._bot = o - self._size

def next(self, data):
c = data.close[0]
Expand Down

0 comments on commit 5266c9b

Please sign in to comment.