Questions from Beginners MQL5 MT5 MetaTrader 5 - page 766
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I propose not to deviate from the concept, which, as I understood it, was to copy a certain amount of bar data at the beginning of the code, and then work with this data - or are you suggesting an exception?
And, what makes you think I'm a programmer?
I don't think it's necessary to guess - what will be faster, sometimes the answer may not be obvious - only experience can give an answer to such questions.
Then you are welcome here.
You need to delete objects with a Ticket which are already in the history, but not those which are still in the market.
You need a Ticket for a closed position, but you can't get it with PositionSelect().
you need to delete objects with a ticket that are already in the history, but not those that are still in the market
Duplicate:
What if the task is "reversed"?
Remove ticket objects whose positions are already out of the market... or do NOT remove ticket objects, which are not yet in the history, and remove the rest... Which is basically the same thing.
In short, you need Ticket of already closed position, but you can't get it with PositionSelect().
Here is a script, which returns Ticket of all closed Positions in history period.
The code tells how to convert it to a function (in English)
Here is the script which returns the Ticket of all closed Positions for a given History period.
The code shows how to convert it to a function (in English)
The most interesting thing is that it was already mentioned right away:
Forum on Trading, Automated Trading Systems and Strategy Testing
Questions from Beginners MQL5 MT5 MetaTrader 5
Artyom Trishkin, 2017.07.24 23:33
Have you tried looking for a closed trade (OUT)? The order was there - you can see it.
The interesting thing is that this was already mentioned right away:
Thanks Artyom, I decided to leave that for later, I asked while I was sleeping)
Here's the script that returns the Ticket of all closed Positions for a given History period.
The code tells how to convert it into a function (in English)
Thanks for the code, it helped.
Problem solved!
The interesting thing is that this has already been mentioned right off the bat:
To the moderator:
The man wanted the code (implementation idea). And there was NOT, but he was sent to Freelance.
To the moderator :
The person wants the code (implementation idea). And there it was NOT beaten, but sent to freelance.
Does someone who is not a programmer have a name?
Yes, I am not a programmer by education, but every day I work on mastering this not easy skill.
Does someone who is not a programmer have a name?
Yes, I'm not a programmer by training, but I work every day to master this not easy skill.
Ah, there you go. Still have the desire to learn programming? Then try to understand what is offered and do not make yourself as an examiner. No offense, but that's how I understood all objections and questions about CopyRates().
I'm not a programmer by education either. When I studied there was no such a specialty and counted on an arithmometer "Felix".