don't use print in plot_dataframe

This commit is contained in:
Matthias 2019-05-30 20:26:46 +02:00
parent b1a01345f9
commit 6347161975

View File

@ -67,7 +67,7 @@ def load_trades(db_url: str = None, exportfilename: str = None) -> pd.DataFrame:
"open_rate", "close_rate", "duration"] "open_rate", "close_rate", "duration"]
for x in Trade.query.all(): for x in Trade.query.all():
print("date: {}".format(x.open_date)) logger.info("date: {}".format(x.open_date))
trades = pd.DataFrame([(t.pair, t.calc_profit(), trades = pd.DataFrame([(t.pair, t.calc_profit(),
t.open_date.replace(tzinfo=timeZone), t.open_date.replace(tzinfo=timeZone),
@ -114,7 +114,6 @@ def get_trading_env(args: Namespace):
# Load the configuration # Load the configuration
_CONF.update(setup_configuration(args, RunMode.BACKTEST)) _CONF.update(setup_configuration(args, RunMode.BACKTEST))
print(_CONF)
pairs = args.pairs.split(',') pairs = args.pairs.split(',')
if pairs is None: if pairs is None:
@ -161,7 +160,7 @@ def get_tickers_data(strategy, exchange, pairs: List[str], timerange: TimeRange,
if data.empty: if data.empty:
del tickers[pair] del tickers[pair]
logger.info( logger.info(
'An issue occured while retreiving datas of %s pair, please retry ' 'An issue occured while retreiving data of %s pair, please retry '
'using -l option for live or --refresh-pairs-cached', pair) 'using -l option for live or --refresh-pairs-cached', pair)
return tickers return tickers
@ -273,6 +272,7 @@ def plot_parse_args(args: List[str]) -> Namespace:
arguments.backtesting_options(arguments.parser) arguments.backtesting_options(arguments.parser)
return arguments.parse_args() return arguments.parse_args()
def main(sysargv: List[str]) -> None: def main(sysargv: List[str]) -> None:
""" """
This function will initiate the bot and start the trading loop. This function will initiate the bot and start the trading loop.