You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
A simple script like this gives me strange results
Maybe someone can explain what's the reason? When number 254 is explicitly converted to uchar, it works as intended.
Thanks for the message, we'll sort it out.
Same story with ushort:
How would you make it so that when a condition occurs, the music starts? Heh-heh, it's a bit strange application of mql)) But to watch the picture waiting for the right moment is boring, and completely leave all the work to the robot somehow not so sensible. So I decided to let the music play when I want it, and then I'll do it myself))
I looked through the reference book, or maybe I was looking too hard or something, but I couldn't find it.)
Check out the function PlaySound()
Question about tracking requotes.
The description of the OrderSend() function says that "When placing a market order, successful completion of the OrderSend() method does not always mean successful execution of the trade. You need to check the ... the retcode value". I.e., it can be inferred that if OrderSend()==true, we can still get a requote. Ok.
But in the example ("Sending a trade request with result handling") to section"Structure of trade request result" the message about a requote is only checked if OrderSend() ==false.
So in which cases do we check for requotes: at any value returned by OrderSend(), or only if OrderSend() ==false?
Question about tracking requotes.
The description of the OrderSend() function says that "when placing a market order, the successful completion of the OrderSend() method does not always mean a successful transaction.
The successful execution of the OrderSend() method only means that the request is checked for correctness and placed in the queue for execution. But its further fate is not guaranteed - the order may be canceled during its processing, for example, due to a filling policy.
But in general, if there was a requote, OrderSend() has clearly failed.
Successful execution of OrderSend() only means that the request has been checked for correctness and queued for execution. But its further fate is not guaranteed - the order may be canceled during its processing, for example, due to the fill policy.
But in general, if there was a requote, OrderSend() has clearly failed.
In other words, a requote means that the request initially failed to pass the correctness check?
Well, yes, the price stated in the request did not match and you are prompted to take into account the new prices which can be obtained from the response structure of the MqlTradeResult server:
Well yes, the price stated in the request did not match and you are prompted to take into account the new prices, which can be obtained from the response structure of the MqlTradeResult server:
OK!
Probably, I'm overdoing it, but here's another question. Before sending a request to place a market order (to open a position), I reset the trade ticket to zero, i.e. I make result.deal=0. Can we expect that the server will return a null trade ticket in MqlTradeResult response structure, but a bit later, the trade will be executed and the position will be opened? Or does the return of a null trade ticket by the server guarantee that the position could not be opened and it will not be further opened based on this request?