BLD: for issue #121, refactored the data portal

This commit is contained in:
Frederic Fortier
2017-12-29 18:35:36 -05:00
parent 2bd54202ce
commit 8ab3382f47
2 changed files with 99 additions and 106 deletions
+8
View File
@@ -79,6 +79,8 @@ class ExchangeTradingAlgorithmBase(TradingAlgorithm):
get_order_attempts=5,
get_open_orders_attempts=5,
cancel_order_attempts=5,
get_stop_value_attempts=5,
get_history_window_attempts=5,
retry_sleeptime=5,
)
@@ -289,6 +291,12 @@ class ExchangeTradingAlgorithmBase(TradingAlgorithm):
return stats
def run(self, data=None, overwrite_sim_params=True):
data.attempts = self.attempts
return super(ExchangeTradingAlgorithmBase, self).run(
data, overwrite_sim_params
)
class ExchangeTradingAlgorithmBacktest(ExchangeTradingAlgorithmBase):
def __init__(self, *args, **kwargs):