Download MetaTrader 5
To add comments, please log in or register
Do you know that MQL5 is an object-oriented language?
Carl Schreiber
5954
Carl Schreiber 2014.03.10 10:52 

Hi,

in the new reference I find only 2 errors if an OrderSend(..) failed:

4067  ERR_TRADE_ERROR   Internal trade error
4109  ERR_TRADE_NOT_ALLOWED  Trade is not allowed. Enable checkbox "Allow live trading" in the Expert Advisor properties

Where are the other and what is in concrete the error-number for IsTradeContextBusy()?

Up to b509+ these order-errors are 129..134 - theses are now compiler errors.. ?

Thanks in advance,

Gooly

BTW: I REALLY, REALLY, would appreciate if these new-lines are not being copied if I copy e.g. a function from the MQL4-Reference into my programs!!

qjol
3243
qjol 2014.03.10 10:58  
Carl Schreiber
5954
Carl Schreiber 2014.03.10 11:04  

Thank you but are they still valid?


These err-numbers are now used differently:

128
 Structure is not defined
 
129
 Structure member with the same name already defined
 
130
 No such structure member
 
131
 Breached pairing of brackets
 
132
 Opening parenthesis "(" expected
 
133
 Unbalanced braces (no "}")
 
134
 Difficult to compile (too much branching, internal stack levels are overfilled)
 
135
 Error of file opening for reading
 

e.g. 135 (formally: ERR_PRICE_CHANGED) is now

Error of file opening for reading

which I guess - could happen not only at compile-time!!

Gooly

PS: See all these needless End-Of-Lines :(

Tjipke de Vries
6280
Tjipke de Vries 2014.03.10 11:50  
Returns true if a thread for trading is occupied by another Expert Advisor, otherwise returns false.
Carl Schreiber
5954
Carl Schreiber 2014.03.10 12:25  
deVries:
Returns true if a thread for trading is occupied by another Expert Advisor, otherwise returns false.

I have read this, I know this - but I want to know whether a re-try on an OrderSend() that failed is meaningful (has become busy - no price changed, ...) or not!
Tjipke de Vries
6280
Tjipke de Vries 2014.03.10 13:24  
gooly:

I have read this, I know this - but I want to know whether a re-try on an OrderSend() that failed is meaningful (has become busy - no price changed, ...) or not!

as long as/ while IsTradeContextBusy Sleep no errornumber
Carl Schreiber
5954
Carl Schreiber 2014.03.10 13:32  
deVries:

as long as/ while IsTradeContextBusy Sleep no errornumber

????

Does this means I make an OrderSend() and I will get no ticket number and no error?

qjol
3243
qjol 2014.03.10 13:44  
i dont know if you will get an error message or not, but one thing you can be sure a ticket no. you will not get because after all IsTradeContextBusy
Tjipke de Vries
6280
Tjipke de Vries 2014.03.10 14:33  
qjol:
i dont know if you will get an error message or not, but one thing you can be sure a ticket no. you will not get because after all IsTradeContextBusy

if tradecontextbusy you can't communicate with your EA to your broker....
qjol
3243
qjol 2014.03.10 14:46  
deVries:

if tradecontextbusy you can't communicate with your EA to your broker....
thats what i have written
qjol:
[...]you will not get ...
Tjipke de Vries
6280
Tjipke de Vries 2014.03.10 14:52  
qjol:
thats what i have written

ok, thanks
/ /12
To add comments, please log in or register