Change date to timestamp conversion method in backtesting
This commit is contained in:
parent
12a84cc30b
commit
e42403fecc
@ -199,8 +199,8 @@ class Backtesting(object):
|
|||||||
# record a tuple of pair, current_profit_percent,
|
# record a tuple of pair, current_profit_percent,
|
||||||
# entry-date, duration
|
# entry-date, duration
|
||||||
records.append((pair, trade_entry[1],
|
records.append((pair, trade_entry[1],
|
||||||
row.date.strftime('%s'),
|
row.date.timestamp(),
|
||||||
row2.date.strftime('%s'),
|
row2.date.timestamp(),
|
||||||
row.date, trade_entry[3]))
|
row.date, trade_entry[3]))
|
||||||
# For now export inside backtest(), maybe change so that backtest()
|
# For now export inside backtest(), maybe change so that backtest()
|
||||||
# returns a tuple like: (dataframe, records, logs, etc)
|
# returns a tuple like: (dataframe, records, logs, etc)
|
||||||
|
Loading…
Reference in New Issue
Block a user