@@ -74,7 +74,12 @@ def _parse_strategy(strategy, config) -> None:
7474 continue
7575 splits = [x for x in strat .split (',' ) if x ]
7676 cls = locate (splits [0 ])
77- args = tuple (splits [1 :]) if len (splits ) > 1 else ()
77+
78+ args = []
79+ for x in splits [1 :]:
80+ args .append (float (x ) if x .isdigit () else x )
81+ args = tuple (args )
82+
7883 strat_configs .append (StrategyConfig (clazz = cls , args = args ))
7984 config .strategy_options = strat_configs
8085
@@ -113,7 +118,7 @@ def _parse_args_to_dict(argv: list) -> dict:
113118
114119
115120def _parse_live_options (argv , config : TradingEngineConfig ) -> None :
116- log .critical ("WARNING : Live trading. money will be lost ;^)" )
121+ log .critical ("\n \n WARNING : Live trading. money will be lost ;^)\n \n " )
117122 if argv .get ('exchange' ):
118123 config .exchange_options .exchange_type = str_to_exchange (argv ['exchange' ])
119124 elif argv .get ('exchanges' ):
@@ -124,7 +129,8 @@ def _parse_live_options(argv, config: TradingEngineConfig) -> None:
124129
125130
126131def _parse_sandbox_options (argv , config ) -> None :
127- log .critical ("Sandbox trading" )
132+ log .critical ("\n \n Sandbox trading\n \n " )
133+
128134 if argv .get ('exchange' ):
129135 config .exchange_options .exchange_type = str_to_exchange (argv ['exchange' ])
130136 elif argv .get ('exchanges' ):
@@ -135,8 +141,7 @@ def _parse_sandbox_options(argv, config) -> None:
135141
136142
137143def _parse_backtest_options (argv , config ) -> None :
138- log .critical ("Backtesting" )
139-
144+ log .critical ("\n \n Backtesting\n \n " )
140145 config .backtest_options = BacktestConfig ()
141146
142147 if argv .get ('exchange' ):
@@ -181,7 +186,7 @@ def parse_command_line_config(argv: list) -> TradingEngineConfig:
181186 if argv .get ('print' ):
182187 config .print = True
183188
184- log .critical ("Config : %s" , str (config ))
189+ log .debug ("Config : %s" , str (config ))
185190
186191 return config
187192
0 commit comments