Meaning of function IsTradeAllowed()
Did you read the documentation ? I guess you will answer . . "Yes of course I did ! ! " so why aren't you checking to see if the trade context is busy ?
IsTradeAllowed "Returns TRUE if the expert is allowed to trade and a thread for trading is not occupied, otherwise returns FALSE."
Thank you very much!!
Can you tell me in what situations a thread for trading is not occupied?!
When it's not being used . . . have a read of this article it will help: Trade Context Busy
Of course it might just be that thou have a lousy Broker, check the Journal (if you are running live or Demo) to see if you have many Login messages or DataCenter connecting failed [2] or connect failed [No connection]
Hi,
I have written an ea which has the following code-lines in his start function:
Now it is sometimes the problem, that I get this error-Message before I want to open or close a trade with that ea.
The ea is activated and the internet connection exists.
How could this happen?!?!!