def _setup_operation(self, next_operation):
client = mock.Mock()
bootstrap = TrailingOrdersFactory().make_fake_bootstrap(
TrailingOrderSetup.make(
next_operation=next_operation,
start_value=self.START_VALUE,
stop_value=self.STOP_VALUE,
reversal=self.REVERSAL,
stop_loss=self.STOP_LOSS,
operational_cost=0.2,
profit=0.5,
)
)
logging_patch = mock.patch('trading_system.systems.trailing_orders.system.logging')
self.addCleanup(logging_patch.stop)
logging_patch.start()
self.system = TrailingOrders(client, bootstrap)
trailing_orders_test.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录