Skip to content

Commit

Permalink
Add datetime to logging
Browse files Browse the repository at this point in the history
  • Loading branch information
enzoampil committed Jul 24, 2021
1 parent 66abb74 commit 376f49d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/fastquant/strategies/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class BaseStrategy(bt.Strategy):
)

def log(self, txt, dt=None):
dt = dt or self.datas[0].datetime.date(0)
dt = dt or self.datas[0].datetime.datetime(0)
print("%s, %s" % (dt.isoformat(), txt))

def update_order_history(self, order):
Expand Down

0 comments on commit 376f49d

Please sign in to comment.