Discussion on MQL4 documentation - page 14

 
Mathemat:
Anyway, hopefully the need for a C compiler has disappeared. Basically, you can find very compact DOS distributions on the web, weighing a dozen meg at most.

Thanks! After two days with C tutorials I finally understood something in Expert Advisors examples. I will try to use MQL4 right away. I hope to get more articles from Rosha soon.
 
Dmitrich:
Mathemat:
Well, hopefully the need for a C compiler has disappeared. In principle, you can find very compact DOS distributions on the web, weighing at most a dozen megs.

Thanks! After two days with C tutorials I finally understood something in Expert Advisors examples. I will try to use MQL4 right away. I hope the articles will also be available soon.

They are available now, though via a temporary link.
 
Rosh:
Dmitrich:
Mathemat:
Well well, hopefully the need for a C compiler has disappeared. Basically, you can find very compact DOS distributions on the web, weighing a dozen megs at most.

Thank you! After two days with C tutorials I've started to understand something in Expert Advisors examples. I will try to use MQL4 right away. I hope more Rosha articles will become available soon.

They are available now, though via a temporary link.

Dear Rosh, Thank you for your articles! I am already wary of writing something like this on the forum, so as not to offend anyone again, but I read your articles so carefully that I discovered a typo. Article 3, line 2, the phrase "each of these" instead of "each of these". The letters "x" and "z" are next to each other on the keyboard and I myself sometimes slip up and then "catch" such mistakes in documents. I caught your typo out of habit.

;)
 
Thanks, I'll fix it if I can (it's been a while :) ).
 
No, I can't. Apparently, the address of the publication system has also changed.
 
The textbook seems to have been dealt with. But the documentation has not given us a direct answer.
And I accidentally decided to look at the list of parameters of theOrderSend function and immediately came across it.

The explanation of the function says: "Youcan't use an estimated or non-normalised price."
It's perfectly clear and concise.

A few lines below is an example with both non-normalised and settlement prices:

ticket=OrderSend(Symbol(),OP_BUY,1,Ask,3,Bid-25*Point,Ask+25*Point, "My order #"+counter,16384,0,Green);
if(ticket<0)
{
Print("OrderSend failed with error #",GetLastError());
return(0);
}
Renat, isn't this an actual error ?
And are such things consistent with the notion of "quality documentation"?

That's why interested users ask you to improve the documentation. They are not seeking to criticize you unreasonably, they are not demanding the impossible or unreasonable, and they are certainly not trying to offend anyone or the company as a whole.
 
This example assumes that the Bid and Ask prices are received from the trade server, which means that the default prices are normalized to digits after the decimal point. In fact, it turned out that before the possibility of downloading a deep minute history from the History Center appeared, many users prepared such a history themselves from various sources and the result obtained during testing gave errors related to non-normalized prices (the orders could simply not open). That is why such a phrase appeared:


An estimated or non-normalised price cannot be used. If the requested opening price was not in the price stream or the requested price is not normalised according to the number of digits after the decimal point, error 129 (ERR_INVALID_PRICE) will be generated.


You "forgot" to quote it in full. And this phrase will remain relevant, because if you took a calculated price (the value of some muving or other indicator), then the server will not bother to show its "smartness" (that is, round it in the right direction), and will simply resend the order.
 

I haven't forgotten anything, Rosh. The suggestion you added to my quote changes nothing in substance or form. I have seen more than once on the MQ forum (I don't remember just this one or a parallel one) people asking why orders are not executed, because I use Bid or Ask price, hence the price is relevant, so why the rejection ? The solution to this question was simple - we should normalize the price and do it even for Bid and Ask.

Maybe this has changed in the latest builds, but I haven't seen it mentioned anywhere.

Also, there are three prices in the OrderSend() parameters. In the above example, two of the three are computed. The computed expression contains both integer operands and double operands. Price normalisation has emerged as a means of solving the problem of representation when converting integers to doubles. So the reader of this documentation who certainly doesn't have much experience in MQL4, will not be able to say for sure whether the result of calculations will be normalized or not. So this example will give rise to more questions than answers.

And even if the normalization is okay, there is still an expression at the price.

So my questions to you, Rosh, as a person who writes articles on MQL4 for beginners:
Do you really believe that this example is OK and illustrates what it is supposed to illustrate ?
Do you really think this example will help a beginner to understand how to use OrderSend() and not confuse him?

 
Yurixx:

Do you really think this example would help a beginner to understand how to use OrderSend() rather than confuse them?

Personally, I believe that a beginner does not equal an idiot. If you figured it out, if it was easy for me, why can't someone else figure it out? Why is this abstract newcomer always associated with a dumbass?
 
Jurix, I can see that you are engaging solely in criticism.