Removed Timestamp cast

This commit is contained in:
Gianluca Puglia 2019-03-20 19:44:59 +01:00
parent 0eff324ce0
commit 6b89e86a97

View File

@ -10,7 +10,7 @@ from datetime import datetime, timedelta
from pathlib import Path from pathlib import Path
from typing import Any, Dict, List, NamedTuple, Optional from typing import Any, Dict, List, NamedTuple, Optional
from pandas import DataFrame, Timestamp from pandas import DataFrame
from tabulate import tabulate from tabulate import tabulate
from freqtrade import optimize from freqtrade import optimize
@ -343,7 +343,7 @@ class Backtesting(object):
# Warnings for this are shown by `validate_backtest_data` # Warnings for this are shown by `validate_backtest_data`
continue continue
if row.date > Timestamp(tmp.datetime): if row.date > tmp.datetime:
continue continue
indexes[pair] += 1 indexes[pair] += 1
@ -369,7 +369,7 @@ class Backtesting(object):
trades.append(trade_entry) trades.append(trade_entry)
else: else:
# Set lock_pair_until to end of testing period if trade could not be closed # Set lock_pair_until to end of testing period if trade could not be closed
lock_pair_until[pair] = Timestamp(end_date.datetime) lock_pair_until[pair] = end_date.datetime
tmp += timedelta(minutes=self.ticker_interval_mins) tmp += timedelta(minutes=self.ticker_interval_mins)
return DataFrame.from_records(trades, columns=BacktestResult._fields) return DataFrame.from_records(trades, columns=BacktestResult._fields)