Update based on comments

This commit is contained in:
Fredrik81
2020-03-15 21:20:32 +01:00
parent 57ff3ff450
commit 8c33e07dc6
6 changed files with 17 additions and 18 deletions

View File

@@ -129,7 +129,7 @@ def load_trades_from_db(db_url: str) -> pd.DataFrame:
return trades
def load_trades(source: str, db_url: str, exportfilename: Path, skip_trades: bool) -> pd.DataFrame:
def load_trades(source: str, db_url: str, exportfilename: Path, no_trades: bool) -> pd.DataFrame:
"""
Based on configuration option "trade_source":
* loads data from DB (using `db_url`)
@@ -137,10 +137,10 @@ def load_trades(source: str, db_url: str, exportfilename: Path, skip_trades: boo
:param source: "DB" or "file" - specify source to load from
:param db_url: sqlalchemy formatted url to a database
:param exportfilename: Json file generated by backtesting
:param skip_trades: Skip using trades, only return backtesting data columns
:param no_trades: Skip using trades, only return backtesting data columns
:return: DataFrame containing trades
"""
if skip_trades:
if no_trades:
df = pd.DataFrame(columns=BT_DATA_COLUMNS)
return df