Beispiel #1
0
 def set_cta_strategy(self, strategy: BaseCtaStrategy):
     '''
     添加策略\n
     @strategy   策略对象
     '''
     ctxid = self.__wrapper__.init_cta_mocker(strategy.name())
     self.__context__ = CtaContext(ctxid, strategy, self.__wrapper__, self)
Beispiel #2
0
 def add_cta_strategy(self, strategy:BaseCtaStrategy):
     '''
     添加CTA策略\n
     @strategy   策略对象
     '''
     id = self.__wrapper__.create_cta_context(strategy.name())
     self.__cta_ctxs__[id] = CtaContext(id, strategy, self.__wrapper__, self)