
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
Good evening. I'd like to hear from the pros.
Please advise which functions are best to use when the following task needs to be done:
I need to open several positions (from the market, without orders) and immediately place their tickets into an array.
The difficulty is getting these tickets, I haven't found any functions that open a position AND return it with a ticket (like in MT4).
Just open transactions in the loop, parameters, etc. - no questions, but to get a ticket just open a position, NOT HAVE!
Please advise plz.
Somehow it goes like this:
Ticket = Function.Open Position(Buy, 0.01, ......);
opening a position AND returning a ticket (as in MT4).
.................... but to get a ticket of just opened position, NOT!!!
Please advise.
When I come to mind, I can only request a ticket of the last open position in the history. But somehow it seems to me clumsy, too ambiguous, there is no direct direct connection between the order in code and open position. For sure there are more correct methods, who has ideas or maybe enough experience, share please?
The only thing that comes to mind is to request a ticket for the last open position in the history. But somehow it seems to me a bit messy, too ambiguous, there is no direct connection between the order in the code and the open position. For sure there are more correct methods, who has ideas or maybe have enough experience, share please?
I have described all this in articles. For mql5 and mql4 everything is done there. You can take an idea and make a function.
However. You have a transaction in which the position identifier is written. Read about the deals and their properties in the documentation.
Good evening. I'd like to hear from the pros.
Please advise which functions are best to use when the following task needs to be done:
I need to open several positions (from the market, without orders) and immediately place their tickets into an array.
The difficulty is getting these tickets, I haven't found any functions that open a position AND return it with a ticket (like in MT4).
Just open transactions in the loop, parameters, etc. - no questions, but to get a ticket just open a position, NOT HAVE!
Please advise plz.
Somehow it goes like this:
Ticket = Function.Open Position(Buy, 0.01, ......);
I have described it all in the articles. For mql5 and mql4 everything is done there. You can take the idea and make the function.
However. You have a deal in which a position identifier is written. Read about the deals and their properties in the documentation.
Thank you very much, I am going to investigate.
Great, that's something to do now :-). I'll figure it out and be sure to post the result, maybe it'll help someone else, too.
Great, that's something to do now :-). I'll figure it out and be sure to post the result, maybe it'll help someone else, too.
There are very few people who do not know. And those who don't know should be able to do it after reading this thread. If they can't, it's not the king's business... to poke around.
I have described it all in the articles. For mql5 and mql4 everything is done there. You can take the idea and make the function.
Thanks, in which of your articles exactly? You have so many of them.....
Good afternoon.
Again, I'm appealing to the gurus of this forum.
I have written a small function. It works, but very slowly. I understand that the algorithm is extremely inefficient. I read it here:
https://www.mql5.com/ru/articles/567
that there'sa function to add to the end of an array.
I don't understand how to use it, please help me to get my imagination back on track, I'll colour code the area of interest.