BUG: fixed python3 issue in run_algo

This commit is contained in:
Frederic Fortier
2018-01-10 13:31:54 -05:00
parent db37c9c6a7
commit b60b50e99a
+8 -2
View File
@@ -148,8 +148,14 @@ def _run(handle_data,
)
sleep(3)
mode = 'paper-trading' if simulate_orders else 'live-trading' \
if live else 'backtest'
if live:
if simulate_orders:
mode = 'paper-trading'
else:
mode = 'live-trading'
else:
mode = 'backtest'
log.info('running algo in {mode} mode'.format(mode=mode))
exchange_name = exchange