Some symbols have no return code

 
As the title say, some symbols don't have return code so I get this error and I have no idea how to solve it. Support is appreciated
 
All symbols are a strings; there are no return codes on string.
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

We can't see your broken code.

 
there is nothing wrong with my code some orders return retcode some simply dont have it and some symbols info tick dont have bid attribute. It might be from the broker. I am in contact with him now
 
Dragos Drimbe:
As the title say, some symbols don't have return code so I get this error and I have no idea how to solve it. Support is appreciated
Dragos Drimbe #:
there is nothing wrong with my code some orders return retcode some simply dont have it and some symbols info tick dont have bid attribute. It might be from the broker. I am in contact with him now

In your first post you claimed that some symbols don't have return code. Which is utter nonsense as William has explained.

Now you are referring to orders (which makes more sense).

Please be absolutely clear when asking for assistance.

 

yes, sorry for confusion. I am new to meta trader and it only happen on some symbol orders. In fact it have no return at all

Any way to fix it? I am writing in Python

 
  1. “Any way to fix it?” You just said “there is nothing wrong with your code.” Make up your mind.

  2. Your calls have return values. Stop saying they “no return at all”

  3. Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

    For the second time: We can't see your broken code.

 
try:
        if not symbol_info.visible:
            if not mt5.symbol_select(symbol, True):
                mt5.symbol_select(symbol, True)
        order = {
            'action': mt5.TRADE_ACTION_DEAL,
            'symbol': symbol,
            'volume': quantity,
            'type': mt5.ORDER_TYPE_SELL,
            "position": pos_id,
            'price': price,
            'deviation': 20,
            'magic': 369369369,
            'comment': "python script close",
            'type_time': mt5.ORDER_TIME_GTC,
            "type_filling": mt5.ORDER_FILLING_IOC,
            }
##        print('We pas second block in sell function')
        result = mt5.order_send(order)
    ##    print(result)
    except Exception as e:
        print("Error code =",mt5.last_error())
        print(e, 'error ', traceback.format_exc())
        pass

try:
        if result.retcode != mt5.TRADE_RETCODE_DONE:
                print("Order_send failed, retcode={}".format(result.comment))
                pass
         else:
                print("Position #{} closed, {}".format(result.comment))

                change_pos(symbol, order, pos_id)
                    
##        print('We pas third block in sell function')
 except Exception as e:
        print("Error code =",mt5.last_error())
        print(e, 'error ', traceback.format_exc())
        pass
This is my code
 
It seems to happen only on sell orders and it seems the return is a bool. Is a server issue or an MT5 issue?