Example #1
0
 def start_pending(self):
     trade = ZTrade()
     trade.currency = self.currency
     trade.take_profit = self.take_profit
     trade.stop_loss = self.stop_loss
     trade.requested_price = self.requested_price
     trade.trailing_stop = self.trailing_stop
     trade.conditional_stop = self.conditional_stop
     if self.lots:
         trade.lots = self.lots
     else:
         trade.lots = settings.TRADE_LOTS
     trade.buy = self.is_buy
     trade.start_pending()
     self.status = "trading"
     self.trade_id = trade.trade_id
     self.save()
Example #2
0
 def start_pending(self):
     trade = ZTrade()
     trade.currency = self.currency
     trade.take_profit = self.take_profit
     trade.stop_loss = self.stop_loss
     trade.requested_price = self.requested_price
     trade.trailing_stop = self.trailing_stop
     trade.conditional_stop = self.conditional_stop
     if self.lots:
         trade.lots = self.lots
     else:
         trade.lots = settings.TRADE_LOTS
     trade.buy = self.is_buy
     trade.start_pending()
     self.status = "trading"
     self.trade_id = trade.trade_id
     self.save()