diff --git a/bfxbot/models.py b/bfxbot/models.py index 576089f..a05be84 100644 --- a/bfxbot/models.py +++ b/bfxbot/models.py @@ -108,15 +108,10 @@ class SymbolStatus: return self.positions[self.current_tick] def all_ticks(self) -> List[int]: - return [x for x in range(self.current_tick)] + return [x for x in range(1, self.current_tick + 1)] def all_prices(self) -> List[float]: - res = [] - - for x in range(1, self.current_tick): - res.append(self.prices[x]) - - return res + return list(map(lambda x: self.prices[x], range(1, self.current_tick + 1))) # Applies strategy and adds position to list async def add_position(self, position: Position): @@ -247,4 +242,4 @@ class EventHandler: def registerhandle(handler): self.any_state.append(handler) return handler - return registerhandle \ No newline at end of file + return registerhandle diff --git a/templates/index.html b/templates/index.html index d3ac6d1..a29b2cd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -10,9 +10,7 @@