IsTradeContextBusy() => Error-Number?

 

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!!

 

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 :(

 
Returns true if a thread for trading is occupied by another Expert Advisor, otherwise returns false.
 
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!
 
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
 
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?

 
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
 
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....
 
deVries:

if tradecontextbusy you can't communicate with your EA to your broker....
thats what i have written
qjol:
[...]you will not get ...
 
qjol:
thats what i have written

ok, thanks
Reason: