What the logbook entry means - page 2

 
I'm going to bind an expert and see what happens )

By the way, I've had an unknown command pop up recently - I remember someone writing about it, but I couldn't find it in the archive...
does anyone remember how it ended?
 
I wrote :) It didn't end with anything. Adding semaphores and timeouts almost nullified the problem, but as you understand, if this "almost" does not close your trade on the real, it will not be enough.

Errors are of different types, the main ones are "wrong price", "6", "1". But there are others :)

If you look at my logs, by the way, you can see that sometimes a cycle of 5 attempts breaks through, and leads to success. Example:
Attempting to close short position, ticket: 1775545
Order with this ticket still present, trying again
Order with this ticket still present, trying again
No more orders with this ticket No, sell closed

Two attempts (instead of 5 as would be the case if all attempts failed) and the order is closed.
 
<br/ translate="no"> I too have 8 EAs hanging right now, all on M5.
From 00:00 to 12:00
trades - 141
errors - 3 ("1", and two "6").


By the way, ping does not give an error message. So, in principle, you might not know that the Expert Advisor tried to do something.
 
unknown command - I gave it, after that there were a few more times, I couldn't find out the reason, you can look here - http://forum.alpari-idc.ru/viewtopic.php?t=45230&start=30
I duplicated it on this forum, but I don't remember where.

Whether anyone has read my post on these two forums - this I do not know ...
 
By the way, ping does not give an error message.
So,
in principle, you might not have known that the expert tried to do something.
there is nothing in the logs about the ping.
 
Кстати, пинг ведь не дает сообщения об ошибке. Так что, в принципе, о том, что эксперт пытался что-то сделать, ты мог и не узнать.
there's nothing in the logs about the ping.


That's the point. Alternatively: ping failed, EA is working as if nothing happened, as there is no connection with the server, error codes are not returned from the server, positions are considered successfully opened - closed... Just scaring :)

The code variant that I cited, after an attempt to close the order, checks if there is an open order with this ticket. That is, the check goes around the error reporting system. This is how I get information about most abnormal situations of order closing.

The opening is another matter. You cannot check the ticket here :(
 
That's the point. As a variant: ping failed, EA works as if nothing happened, because there is no connection with server, error codes are not returned from server, positions are considered as successfully opened - closed... Just scaring :)

Many errors are returned by the terminal itself - it doesn't need connection ;) Try to forcefully open or close a position offline =)))

The version of the code I cited, after trying to close an order, checks to see if there is an open order with that ticket. That is, the check bypasses the error message system. This is how I get information about most of the abnormal close order situations.

I check it this way:
bool orderclose = OrderClose( _OrderTicket, _Volume, _ClosePrice, _Slippage, _Color ); _GetLastError = GetLastError(); //---- If there is an error, if ( !orderclose || _GetLastError > 0 ) {


no pseudo-closed positions situations have been observed so far ;)



zy. About your code.
I copied it, customized it, connected my library and ran it on 8 M5 charts. Then I left, and when I came back I have found out that nothing happens - EAs do not trade ((
I will now launch your version and tomorrow I will make out the reasons why mine did not work ;)

 
Maybe, it's because of ping, I don't have cycles to retry orders, maybe I should call Refresh in this place and put fresher prices.
I think it's better to always use fresh prices, i.e. MarketInfo( Symbol(), MODE_BID ) and MODE_ASK
 
<br/ translate="no">z. About your code.
I still when I wrote the post, copied it, set it up, plugged in my library and ran it on 8 M5 charts. Then I left and when I came back I have found out that nothing happens - EAs do not trade ((
I will run your version now and tomorrow I will try to find out why mine did not work ;)


How can it work on five-minute symbols when it has a clear setting for hours, for example:
if(Symbol() == "EURUSD" && Period() == 60)

:))

Alas, we will have to wait a long time. This particular Expert Advisor fails about once a week - in fact, it trades infrequently. We can remove ==60 and run it on M5, but in this case it is guaranteed to fail.
 
I messed up about M5 =) I pinned it on the watch, it still doesn't work...

And now, attached your code, began a new hour - in a log only a few errors, no position open...
2005.09.07 01:01:53 quark_test_expert: wrong delimiter for FileOpen as BIN function<br / translate="no"> 2005.09.07 01:01:11 quark_test_expert: wrong delimiter for FileOpen as BIN function
2005.09.07 01:00:21 quark_test_expert: wrong delimiter for FileOpen as BIN function
2005.09.07 01:00:14 quark_test_expert: wrong delimiter for FileOpen as BIN function
2005.09.07 00:59:55 quark_test_expert: wrong delimiter for FileOpen as BIN function
2005.09.07 00:59:55 quark_test_expert: wrong delimiter for FileOpen as BIN function
Reason: