Exemplo n.º 1
0
 def order_expiration(self):
     if self._view.contractComboBox.currentText() == "GTC":
         Trader.order_time = mt5.ORDER_TIME_GTC
     elif self._view.contractComboBox.currentText() == "Today":
         Trader.order_time = mt5.ORDER_TIME_DAY
     elif self._view.contractComboBox.currentText() == "Specified":
         Trader.order_time = mt5.ORDER_TIME_SPECIFIED
         Trader.order_tt = QTime.toPyTime(self._view.dateTimeEdit.time())
         self.check_time()
Exemplo n.º 2
0
 def check_time(self):
     threading.Timer(3.0, self.check_time).start()
     if QTime.toPyTime(self._view.dateTimeEdit.time()) != Trader.order_tt:
         Trader.order_tt = QTime.toPyTime(self._view.dateTimeEdit.time())