order_send() error in python algo trading

 

Hi,

i'm new in mt5 algo trading and i want to learn python algo trading. but when i insert codes from 'integration -> metatrader for python -> order_send()' and inter the 'order_send()' 

command, i get this error: retcode: 10030

i repeat again that i didn't write the code and it's from the site. thank you for your help

MQL5.community - User Memo
MQL5.community - User Memo
  • www.mql5.com
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
Files:
 
mahdi ghaffari: Hi, i'm new in mt5 algo trading and i want to learn python algo trading. but when i insert codes from 'integration -> metatrader for python -> order_send()' and inter the 'order_send()' command, i get this error: retcode: 10030 i repeat again that i didn't write the code and it's from the site. thank you for your help

You have to set the correct filling policy for the trade, depending on your broker's conditions, such as account type, symbol type and contract specifications.

Even if the source code is from the documentation example, you have to adjust it based on the conditions specific to your broker, account and symbol being traded.

10030

TRADE_RETCODE_INVALID_FILL

Invalid order filling type

Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Trade Server Return Codes