Translation needed please...

 

Following page on Russian forum: http://www.metatrader4.com/ru/forum/6907/page2

Search on "Renat 30.03.06 14:09" to find post of interest.

I have used Google and AltaVista Babel Fish (which actually came out better when copied post body and then translated in text box)

Anyway - I have been searching/reading regards Error Management before, during and after OrderSend() called.

This page on Russian forum is closest I have come to getting some specific recommendations. Maybe Renat is associated with MetaQuotes Corp.??? or otherwise speaks with knowledge!

Can someone get a better translation of this post as would be VIP thing, for sure...

Or even better/as well, any other links to docs about How To Handle Error Codes During Order Transactions

This is I feel very important otherwise Broker's Trade Server can really get hammered by some invalid EA code and I presume in worst case, account may be terminated. ..

Lots of EA's appear to function ok, but I will suggest that not many are actually robust or comprehensive when it comes to trapping ALL possible errors.

So, comments, recommendations etc. are really wanted.

Thank you Kindly

Best I could get by using AltaVista (http://babelfish.altavista.com/tr) with text taken from .ru page.

All types of errors exist in the documentation. To react with the alliteration of transaction is must only to the simple of the type of incorrect prices. I will lead the simplified recommendations regarding the basic errors in treydinge:

ERR_.TRADE_.TIMEOUT - diler/server they did not answer, it is possible to attempt to repeat the transaction after a certain time (for example, minute, and not after 5 s)

ERR_.TOO_.FREQUENT_.REQUESTS or ERR_.TOO_.MANY_.REQUESTS - superfluously frequent demands to the transactions, it is necessary to decrease the frequency of demands, this it clearly indicates the errors in the logic of eksperta/ekspertov

ERR_.INVALID_.PRICE - incorrect prices bid/ask, often because the trader forgets about the renovation of market information through RefreshRates after delays unambiguously he indicates the most serious errors in expert after such errors in effect necessary to stop treyding and to examine the code.

ERR_.INVALID_.STOPS - too close feet or frankly incorrect prices in the feet (take profit, stop loss or open price in the postponed warrants), practically it is not possible to repeat commercial command, if only there are no 100% of guarantee, that this occurred because of the antiquating of price.

ERR_.INVALID_.TRADE_.VOLUME - error in the granulation of volumes, in no case it is not possible to repeat the transaction

ERR_.MARKET_.CLOSED - market is closed, it is possible to try transaction, but only through the sufficiently large period (several minutes)

ERR_.TRADE_.DISABLED - trade on the tool is completely forbidden, cannot be repeated transaction in no case.

ERR_.NOT_.ENOUGH_.MONEY - money do not be sufficient, to repeat transaction with the same parameters is categorically cannot it is possible to repeat, after decreasing the volume, but it is necessary to be to confident in the sufficiency of means and correct granulation of volume.

ERR_.PRICE_.CHANGED or ERR_.REQUOTE - rekvot - price renewed, has sense to renew market environment and to try anew, it is possible even without the delays.

ERR_.OFF_.QUOTES or ERR_.BROKER_.BUSY - dealer on some to reason (for example, in the beginning of the session of prices no, the not confirmed prices, fast market) did not give prices or refused it makes sense to repeat the transaction through the small period of time (from 5 s) on the renovated market environment

ERR_.ORDER_.LOCKED - warrant is blocked and has already been processed, similarly to the explicit error in the logic of expert or in the terminal itself MT4, it is better anything not to repeat, but to leave

ERR_.LONG_.POSITIONS_.ONLY_.ALLOWED - is permitted only purchase, to repeat Sell in no case is impossible

ERR_.TRADE_.MODIFY_.DENIED - modification is forbidden, since warrant is too close to the market and the performance, it is possible to try through a certain time interval (seconds through 10-15, but on no account immediately)

ERR_.TRADE_.CONTEXT_.BUSY - commercial flow is occupied, it is necessary to use IsTradeAllowed(), expert taking into account the employment of the flow clearly is required to rewrite

ERR_.TRADE_.EXPIRATION_.DENIED - is forbidden to use field expiration in the postponed warrants, to potovrit' operation is possible only if we remove expiration.

 
Thanx stringo - I need better glasses ;-) I got so deep into .ru site that for sure believed content must be total VIP so just had to have content... lol
BTW- I am becoming unstuck all the time now that I am doing EA work due to compile errors regards stderror.mqh contents.
I have kludges for all >31ch #defines found in stderror.mqh (using own cloned stderror), but let's face it - each further line of code which uses these work around #defines is just another error down the line, yes?
MQ has [must have] a bespoke compiler code block eg, "if input src==stderror. mqh then ignore ...- too long variable name syntax errors"
Put ANY length of #define in stderror.mqh and stand back in awe as the compiler ignores name length - lol
Do same in any other compile time src file and watch compiler SHOUT "error"
example
#define THIS_IS_A_VERY_LONG_IDENTIFIER_NAME_OVER_31_CHARACTERS_AT_60 60
total length of 60chs and [of course] if parsed in stderror.mqh the compiler accepts [have put in 121ch define and accepted too]
But of course, cannot use ANY >31ch #define and/or variable name anywhere outside of stderror.
So then, just what is the purpose of a stderr.mqh with partially valid content? (validity as noted in MQL4 Reference - Basics - Syntax - Identifiers)
I do not speak for other coders, but to me the words "hard coded constant" sends me stark raving mad!
There is no excuse for using constants EVER - forgetting maintenance issues, src readability/clarity is NULL when that type of junk/novice hacking is used.
MQ may well complain about rogue EAs messing with their trade server - sure... that is not funny is it?
But how about MQ cleaning up their own house and [just maybe] best s/w engineering practices as implemented by MQ staff and as seen in [updated] docs and examples, will [in the end] be used by EA coders too! End result? less trade server issues !
Always worth a try is it not? ;)
I gave up looking at all other MQL4 #define lengths! What are odds that more lurking about? ;)
Your ref:
standard constants with more than 31 length
'standard constants with more than 31 length'
Thank you for taking time to read this post.
:-)
Reason: