Download MetaTrader 5

Problem with ea and stock market

To add comments, please log in or register
Dasio1986
531
Dasio1986 2013.09.13 10:59 

Hi,

i'm running an ea both currencies and stock market. The problem is that the ea wrk perfectly in currencies but doesn't open position in the stock market.

I need to know if exist some parameter the must be change for an ea to work in stok market.

Thank you 

Alain Verleyen
Moderator
31134
Alain Verleyen 2013.09.13 12:15  
Dasio1986:

Hi,

i'm running an ea both currencies and stock market. The problem is that the ea wrk perfectly in currencies but doesn't open position in the stock market.

I need to know if exist some parameter the must be change for an ea to work in stok market.

Thank you 

Certainly, but you have firstly to identify the problem. Does it returned an error code or something in the log ?
OOP in MQL5 by Example: Processing Warning and Error Codes
OOP in MQL5 by Example: Processing Warning and Error Codes
  • 2010.05.26
  • KlimMalgin
  • www.mql5.com
The article describes an example of creating a class for working with the trade server return codes and all the errors that occur during the MQL-program run. Read the article, and you will learn how to work with classes and objects in MQL5. At the same time, this is a convenient tool for handling errors; and you can further change this tool according to your specific needs.
Dasio1986
531
Dasio1986 2013.09.13 12:20  
angevoyageur:
Certainly, but you have firstly to identify the problem. Does it returned an error code or something in the log ?

Hi, the platforms don't return any error. Internally i code all variable automatically.

Period, Symbol etc etc 

Alain Verleyen
Moderator
31134
Alain Verleyen 2013.09.13 12:49  
Dasio1986:

Hi, the platforms don't return any error. Internally i code all variable automatically.

Period, Symbol etc etc 

If you send an order to buy/sell and you don't get a position, then there is an error somewhere, you have to get this error from your code and print it.

Can you show the code you are using to send the trade request ?

To add comments, please log in or register