def auto_cc_plan(self): status = self.CS.status ticket = Ticket(self.cur_name,self.cur_tf) if not self.CS.has_cc(): return cmd = 1 if status['CC']['ZPOINT'] == 'MW_down' else 0 factor = -1 if cmd == 1 else 1 entry = float(status['CC']['CC1P']) stoploss = float(status['CC']['CC1P']) + 0.10 * factor takeprofit= status['CC']['OBJPROP_PRICE1'] ticket.new(ordertype = 'ordersend', orderbody = {'cmd':cmd,'vol':0.01,'price':entry,'stoploss':stoploss,'takeprofit':takeprofit}) return