Merge pull request #2674 from freqtrade/bt_trade_open_price

Pre-calculate open_trade_price
This commit is contained in:
hroff-1902
2019-12-17 21:51:13 +03:00
committed by GitHub
10 changed files with 144 additions and 70 deletions

View File

@@ -108,7 +108,7 @@ def load_trades_from_db(db_url: str) -> pd.DataFrame:
trades = pd.DataFrame([(t.pair,
t.open_date.replace(tzinfo=timezone.utc),
t.close_date.replace(tzinfo=timezone.utc) if t.close_date else None,
t.calc_profit(), t.calc_profit_percent(),
t.calc_profit(), t.calc_profit_ratio(),
t.open_rate, t.close_rate, t.amount,
(round((t.close_date.timestamp() - t.open_date.timestamp()) / 60, 2)
if t.close_date else None),