mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-11 12:00:50 +08:00
BLD: for issue #121, refactored the data portal
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user