Download MetaTrader 5

IsTradeContextBusy() => Error-Number?

To add comments, please log in or register
Carl Schreiber
Moderator
7964
Carl Schreiber  

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
3245
qjol  
Carl Schreiber
Moderator
7964
Carl Schreiber  

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
4474
Tjipke de Vries  
Returns true if a thread for trading is occupied by another Expert Advisor, otherwise returns false.
Carl Schreiber
Moderator
7964
Carl Schreiber  
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
4474
Tjipke de Vries  
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
Moderator
7964
Carl Schreiber  
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
3245
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
Tjipke de Vries
4474
Tjipke de Vries  
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
3245
qjol  
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
4474
Tjipke de Vries  
qjol:
thats what i have written

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