Getting 10017 and 10027 error codes with MT5

 

Context:

This is my second time using MT5 with my python code and it used to work perfectly fine placing trades around 6 months ago. 

Now when I try connecting via the same exact code I get both of these error codes when I try to place trade depending on which algorithmic trading option is enabled.

When I click on algo trading on the interface, it automatically disables it in the options tab and I get the 10017 error code. 

When I enable it in the options tab it automatically disables it on the interface, and I get the 10027 error code. 

I reached out to their customer service and they declined to give me further information because I am using a "third party EA", but this still doesn't explain why it worked fine 6 months ago. They didn't tell me they made policy changes or anything, just an outright refusal to give me service. 

I tried restarting/reinstalling, etc. Still no cigar. 

Anyone know what's up?

 
M Ibrahim:

It is possible that an update to MT5 has changed the way connections are handled from Python. Try the following:

  • Upgrade the library with pip install --upgrade MetaTrader5.
  • Check if mt5.initialize() and mt5.terminal_info() return valid information.
  • Check the official documentation for possible changes. (This has always been the case. The language evolves and naturally changes over time. As a programmer, you should already know this without needing an explanation, which leads us to believe that you may not fully understand what you're dealing with.)
  • Confirm with your broker if they have modified permissions for algorithmic trading.

Note: They refused to assist you because, logically, it's your own code, and they can't know how it's structured.

It would be like developing an app for Windows and expecting Microsoft to provide support for its code without knowing its structure or complexity.

I reached out to their customer service and they declined to give me further information because I am using a "third party EA", but this still doesn't explain why it worked fine 6 months ago. They didn't tell me they made policy changes or anything, just an outright refusal to give me service.
Your approach, no offence, is a little ridiculous.
 
Miguel Angel Vico Alba #:

It is possible that an update to MT5 has changed the way connections are handled from Python. Try the following:

  • Upgrade the library with pip install --upgrade MetaTrader5.
  • Check if mt5.initialize() and mt5.terminal_info() return valid information.
  • Check the official documentation for possible changes. (This has always been the case. The language evolves and naturally changes over time. As a programmer, you should already know this without needing an explanation, which leads us to believe that you may not fully understand what you're dealing with.)
  • Confirm with your broker if they have modified permissions for algorithmic trading.

Note: They refused to assist you because, logically, it's your own code, and they can't know how it's structured.

It would be like developing an app for Windows and expecting Microsoft to provide support for its code without knowing its structure or complexity.

Your approach, no offence, is a little ridiculous.

I tried upgrading, still the same problem. 

Mt5 functions work fine such as those you mentioned. All of the code works perfectly fine but I can't place trades. 

The agreement with ******* states that third party software is allowed, but they don't provide advice on it. 


However this might be the problem when executing trades that I can't solve:

"When I click on algo trading on the interface, it automatically disables it in the options tab and I get the 10017 error code. 

When I enable it in the options tab it automatically disables it on the interface, and I get the 10027 error code. "


I know it's not the code, because it worked before and it still executes fine, it has something to do with MT5. Do varying brokers use different versions of MT5? 

 
M Ibrahim #:

I'm sorry I can't provide any further arguments at this time.

From my perspective, the problem seems to be on your side, as there are thousands, or even hundreds of thousands of users using the MT5 Python API, and as far as I know, this problem has not been reported. Therefore, I stand by what I initially mentioned: I think the problem is in your code.

Just because it worked before and doesn't work now doesn't necessarily imply that the problem is in the terminal. Also, no one but you can verify this, as you are the only one who has access to the code to check it.

Remember also that it is important to use the terminal provided by the broker. As for what you mentioned about the broker, I ask you to please avoid it in future posts. As I mentioned in a post I deleted, talking about brokers is not allowed, as it can be interpreted as indirect advertising and is not relevant to solving the problem.

I hope someone else can read this post and maybe provide a solution if they face the same problem. But honestly, I think the problem is on your side and only you can solve it.

 
Miguel Angel Vico Alba #:

I'm sorry I can't provide any further arguments at this time.

From my perspective, the problem seems to be on your side, as there are thousands, or even hundreds of thousands of users using the MT5 Python API, and as far as I know, this problem has not been reported. Therefore, I stand by what I initially mentioned: I think the problem is in your code.

Just because it worked before and doesn't work now doesn't necessarily imply that the problem is in the terminal. Also, no one but you can verify this, as you are the only one who has access to the code to check it.

Remember also that it is important to use the terminal provided by the broker. As for what you mentioned about the broker, I ask you to please avoid it in future posts. As I mentioned in a post I deleted, talking about brokers is not allowed, as it can be interpreted as indirect advertising and is not relevant to solving the problem.

I hope someone else can read this post and maybe provide a solution if they face the same problem. But honestly, I think the problem is on your side and only you can solve it.

I just figured it out, I was using the read-only password rather than the master for login. thanks though! 

 
M Ibrahim #I just figured it out, I was using the read-only password rather than the master for login. thanks though! 

I was convinced that the problem was on your side (this is 99% of the time).

Thank you for reporting that the problem has been solved. 😉