Results of the expert test proposed by Slava "take it from this thread and run it". "I ran it on two computers with different versions of MT4 from 18:00 to 24:00 on 11.10.2005. First computer: Extended Logging version dated 05.10.2005: 114 errors 146 and 1 error 138. Second computer: official version of 07.10.2005: 278 errors number 146
First comp: version with extended logging from 05.10.2005: 114 ошибок номер 146 и 1 номер 138 Second comp: official version from 07.10.2005: 278 errors number 146
Explain, Slava...
let me explain. to exclude error 146 (trade context is busy), you need to pause before releasing semaphore. instead of
Sleep(1000); - the error has not disappeared<br / translate="no"> Sleep(10000); - the error has not disappeared What is the "organoleptic" way to do it?
please find the value when the error disappears. report this value and send the Expert Advisor logs from the previous (still erroneous) value to stringoATmetaquotesDOTru
i.e. we are waiting for our own trade context to be released
and this situation is extremely strange. after a trade operation is executed, the context is released instantly. otherwise it would be impossible to close positions in the loop
Sleep(1000); - the error has not disappeared<br/ translate="no"> Sleep(10000); - the error has not disappeared What is it to make it "organoleptically"?
another question. don't you have other Expert Advisors that trade? they may not know anything about our trade semaphore. then error 146 is very well explainable
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
18:29:55 TradeContext: start connection
18:29:55 'Alpari-Demo': start connection
18:29:56 '67794' - login error (6, 10054)
18:29:56 '67794': cannot login [No connection]
18:30:35 'TradeContext': start connection
18:30:35 'Alpari-Demo': start connection
18:30:35 '67794' - login error (6, 10054)
18:30:35 '67794': cannot login [No connection]
18:31:03 'TradeContext': start connection
18:31:03 'Alpari-Demo': start connection
18:31:03 '67794' - login error (6, 10054)
18:31:03 '67794': cannot login [No connection]
18:31:10 'TradeContext': start connection
18:31:10 'Alpari-Demo': start connection
18:31:10 '67794' - login error (6, 10054)
18:31:10 '67794': cannot login [No connection]
18:31:11 'TradeContext': start connection
18:31:11 'Alpari-Demo': start connection
18:31:11 '67794' - login error (6, 10054)
18:31:11 '67794': cannot login [No connection]
18:31:20 'TradeContext': start connection
18:31:20 'Alpari-Demo': start connection
18:31:20 '67794' - login error (6, 10054)
18:31:20 '67794': cannot login [No connection]
18:31:27 'TradeContext': start connection
18:31:27 'Alpari-Demo': start connection
18:31:27 '67794' - login error (6, 10054)
18:31:27 '67794': cannot login [No connection]
"I ran it on two computers with different versions of MT4 from 18:00 to 24:00 on 11.10.2005.
First computer: Extended Logging version dated 05.10.2005: 114 errors 146 and 1 error 138.
Second computer: official version of 07.10.2005: 278 errors number 146
Explain, Slava...
Second comp: official version from 07.10.2005: 278 errors number 146
Explain, Slava...
let me explain. to exclude error 146 (trade context is busy), you need to pause before releasing semaphore. instead of
write
if(!IsTesting()) { Sleep(1000); GlobalVariableSet(strTradeSemaphore, 0.0); }the size of the delay should be adjusted "organoleptically". it may be different for different computers
"Something in my engine started tapping
Let's hear it
And there's a gasoline smell coming from the cabin.
Let's smell it."
Sleep(10000); - the error has not disappeared
How do you make it "organoleptically"?
What is the "organoleptic" way to do it?
please find the value when the error disappears. report this value and send the Expert Advisor logs from the previous (still erroneous) value to stringoATmetaquotesDOTru
i.e. we are waiting for our own trade context to be released
and this situation is extremely strange. after a trade operation is executed, the context is released instantly. otherwise it would be impossible to close positions in the loop
What is it to make it "organoleptically"?
another question. don't you have other Expert Advisors that trade? they may not know anything about our trade semaphore. then error 146 is very well explainable
Where should I put this code?