ERR_COMMON_ERROR

 
Hello all,

Two questions regarding ERR_COMMON_ERROR error code.

In the MLQ4 documentation it says that...


ERR_COMMON_ERROR
Common error. All attempts to trade must be stopped until reasons are clarified. Restart of operation system and client terminal will possibly be needed.


QUESTION #1:
Under what exact circumstances would ERR_COMMON_ERROR be generated by the MLQ4 trade management functions?

QUESTION #2:
The documentation says "restart of operation system and client terminal will possibly be needed", possibly being the operative word. Can one attempt to retry the trade function that generated this error after a pause to see if the error clears itself?

Regards,

Laurence.
 
Hello Laurence

ERR_COMMON_ERROR is an elusive beast. Think Trade Server issue.

Yes... vague or what!

I have to date been unable to pin down a number of tradeServer errors regards handling - 'concise' handling...

Personally, I use commonError as fatal flag in EA. The first line checks for this and if 'gError' holds, then return(comm...);

I presume many coders see this as requiring manual intervention and when googling, one turns up little - just usual refs or complaints about getting the error from Terminal.

I have an ongoing 'issue' [polite of course :] with MetaQuotes - IF search threads you will gradually see that the best word for 'concise' is nebulous... imho.

The whole subject is deFactoStandard head-in-sand mentality imho. English [or any language] is inadequate to describe 'exactly' path to follow regards error handling (but hey, I'd settle even for .ru)

TBH, I've often wondered just why one persists with coding under MT - is money in the end and error handling is [to me] the most critical piece of the puzzle.

My sincere advice is to log, log, log and abort (the EA way...;) and then start digging for answers 'after the event' since then, you have more ammunition/information to use in further enquiries.

As said, is not in any stretch of the imagination, an answer but that's my way - just log all data possible and then cease entry to body of start() via global scoped flag.

Oh yes, I specifically developed unique magic# for each EA running and it has subfield able to hold 1..99,999 so that each OrderSend() for the EA has 'next' order#.

IF sh*t hits the fan, the EA logs relevant environment info via [Print() and or Log() to file]. The EA then traverses trade pool list looking for ANY order having 'my' EAs magic# root value (irrespective of what order# field contains) and when found it is CLOSED. Call it damage limitation/live to fight another day!

As said, is very sad way to do this but until a concise and consistent error handling environment exists in MT...

TBH, I use above a lot in my errorHandler() - just too frightening for me to consider some rampant EA chewing up my deposit!

And... the whole purpose of a robot surely is to allow one chance to totally remove self from vicinity of any form of computer!!!

PLEASE, please DO post any information you find or design to help in this area - surely there must be a few who would greatly benifit...

Best Regards,

Tim
 
Thanks for taking the time to reply Tim, much appreciated.

I agree that if one is going to code an EA that is going to automate the trading process to some extent it is crucial that one handles each and every possible trade execution error that the MQL4 functions are likely to return.

Whilst the other execution errors are easy enough to handle the ERR_COMMON_ERROR error code does seem a bit "nebulous" as you say.

Having to possibly restart ones PC when this error occurs is drastic in the extreme. I hope that someone from Metaquotes can shed some light on the precise nature of the error. It would certainly give MQL4 coders some much needed insight into the nature of this error and the correct way to handle its occurance.

Regards,

Laurence.
 
Hi there,

Does anyone at Metaquotes have any information regarding ERR_COMMON_ERROR as per my original post?

Regards,

Laurence.
 
Hello Laurence

Today I was introduced to https://www.mql5.com/ru/forum/107476/page1

Is developing thread with many pages so far. Your answer may be there - not see yet but many other error codes are being dealt with and no doubt one might strike gold!

I use http://babelfish.altavista.com/babelfish/tr
just paste in .ru URL and select Russian to English
and away you go. Once page displayed, all further clicks on page handled by babelfish - so excepting for short translation phase/delay - you will not notice. Can even click on attachments like xyz.mq4 and should get the windows open,save,... popup. I use open, and MetaEditor gets it...
Code is English, comments most likely Russian - but although I have found going hard - maybe good as I must use pencil + paper and jot down any bits I can understand and then... try to 'join the dots' in order to get overall perspective of what reading - translators are great but better have some aspirn handy!

Definitely forces one to think about each word - nuances are poss too! (but admit to always wondering if I really 'got it' - lol)

WoW - is adventure for sure!

Please do relay any info you find which is unattainable elsewhere (I do likewise)
and maybe any 'this is how I am using .ru site' ideas.

Well, back to my Russian lessons!

Tim

btw.
is great site - very dynamic and lively... "full of beans" as they say - enjoy :o)))
Reason: