TheSnowGuru / PyTrader-python-mt4-mt5-trading-api-connector-drag-n-drop

Open Source Trading Strategies & End-to-End solution connecting Metatrader4 & Metatrader5 💹 with Python with a simple drag and drop EA. Fully tested bug free & efficient solution for live & paper trading⭐ Full Documentation ready. Lightweight, efficient and stable implementation 🔥
https://discord.gg/wRMUNP8ERa
653 stars 11 forks source link

SyntaxError: 'break' outside loop #39

Closed MarcellThoth closed 1 month ago

MarcellThoth commented 1 year ago

On the V3_01a.py at

def send_command(self,
                   command):
      self.command = command + self.authorization_code + "^" "!"
      self.timeout = False

      try:
          self.sock.send(bytes(self.command, "utf-8"))
          data_received = ''
          try:
              data_received = data_received + self.sock.recv(500000).decode()
              if data_received.endswith('!'):
                  break

On line 2088 I'm getting a SyntaxError: 'break' outside loop. Could you look into it please?