Error opening BUY order : 0

 

Hi All,

I just started using mql4 few weeks ago. My EA is working fine in tester, but it gives me this error in live :

Error opening BUY order : 0

The sell orders are executing correctly, only buy orders are not placing. I have tried running on different times with different brokers but same result.

Any help would be appreciated.

Thanks in advance !

 

Learn

  1. to read the log files it tells you the error,
  2. to use the debugger:
    Code debugging:  https://www.metatrader5.com/en/metaeditor/help/development/debug
    Error Handling and Logging in MQL5:  https://www.mql5.com/en/articles/2041
    Tracing, Debugging and Structural Analysis of Source Code, scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/272
  3. to search as there's virtually nothing that hasn't already been programmed for MT4/MT5: copy & paste is a lot faster to make any rookie mistake
    https://www.mql5.com/en/search
  4. finally MT4 is here and not elsewhere.
Code debugging - Developing programs - MetaEditor Help
  • www.metatrader5.com
MetaEditor has a built-in debugger allowing you to check a program execution step by step (by individual functions). Place breakpoints in the code...
 
Carl Schreiber #:

Learn

  1. to read the log files it tells you the error,
  2. to use the debugger:
    Code debugging:  https://www.metatrader5.com/en/metaeditor/help/development/debug
    Error Handling and Logging in MQL5:  https://www.mql5.com/en/articles/2041
    Tracing, Debugging and Structural Analysis of Source Code, scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/272
  3. to search as there's virtually nothing that hasn't already been programmed for MT4/MT5: copy & paste is a lot faster to make any rookie mistake
    https://www.mql5.com/en/search
  4. finally MT4 is here and not elsewhere.
Sorry, I didn't get it. I am using Mt4 for my code.
 

Do you have the code? If so, try this in the code after you try to place the order.

Alert(GetLastError());


If it's not your EA contact the developer?

 
andrew4789 #: Do you have the code? If so, try this in the code after you try to place the order. If it's not your EA contact the developer?

Yes I have the code, where do I paste this ? I think I have already have it but not sure if its correct.

...

Improperly formatted code removed by moderator. Please EDIT your post and use the CODE button (Alt-S) when inserting code.

Code button in editor

Hover your mouse over your post and select "edit" ... 

...