From 6981669a6880ff0e3ddc8c3d1da07c14046af02b Mon Sep 17 00:00:00 2001 From: fredfortier Date: Fri, 8 Dec 2017 18:26:42 -0500 Subject: [PATCH] BUG: adding capital_base to the interface --- catalyst/examples/arbitrage_with_interface.py | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/catalyst/examples/arbitrage_with_interface.py b/catalyst/examples/arbitrage_with_interface.py index c0c0d343..67459e9a 100644 --- a/catalyst/examples/arbitrage_with_interface.py +++ b/catalyst/examples/arbitrage_with_interface.py @@ -263,13 +263,20 @@ def analyze(context, stats): pass -run_algorithm( - initialize=initialize, - handle_data=handle_data, - analyze=analyze, - exchange_name='poloniex,bitfinex', - live=True, - algo_namespace=algo_namespace, - quote_currency='btc', - live_graph=False -) +if __name__ == '__main__': + # The execution mode: backtest or live + MODE = 'live' + if MODE == 'live': + run_algorithm( + capital_base=0.1, + initialize=initialize, + handle_data=handle_data, + analyze=analyze, + exchange_name='poloniex,bitfinex', + live=True, + algo_namespace=algo_namespace, + base_currency='btc', + live_graph=False, + simulate_orders=True, + stats_output=None, + )