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
Hooray, I think I've achieved an acceptable result.
The array fills with the required data as the positions are opened.
If I run the EA in the tester, I can see the first four entries in the comments, if the tester is at low speed, and a pause is used - everything is clear.
I attach the file with the code.
Now I try to fool around with the first condition and assign N_Caste = 1 to positions that meet this condition;
The critics are welcome.
Thanks to all not indifferent.
... Such things are either self-written or commissioned from freelancing.
Sorry, couldn't get past it. Aren't there things like that?
Goodnight.
As a follow-up to the messages above - taught the EA to create a two-dimensional array, enter into it the values of the ticket and rank for each position, as the positions open.
In the future, when signals or conditions come, ranks of corresponding positions will change. This is how I plan to manage positions.
There is a problem - I ask professionals to respond. Help me to deal with deleting elements from the array.
As positions are closed, elites accumulate in the array, which stores the ticket and the rank of a "dead" already closed position, how to remove I do not know.
The operation on pp. 172-173 does not work.
In OnTick() at each candlestick, positions are opened, their stops are modified, their ticks are entered into the array, and the original zero rank is assigned.
As the stops trigger, the array accumulates unnecessary elements. For clarity I've output the necessary comments and everything is visible online.
The code is small, so I will post it here and attach the file too.
Please help me organize the array cleaning.
For the clarity of the process it is better to put StLoss 0, TProf should leave 50, and the EA should be put on the hourly chart of any currency. This is in the tester.
On the onlan demo, of course minutes is better
For the clarity of the process it is better to put StLoss 0, TProf should remain 50, and the EA should be placed on the hourly chart of any currency. This is in the tester.
On the onlan demo, of course minutes is better.
St.Loss † ©On your wall!
I fell off my chair)
St.Loss is inevitable.
Hmmm... we've got someone on the subject, well †, already on the forum... )
St.Loss † © On your wall!
I fell out of my chair)
Apparently St.Loss is inevitable.
Hmmm... someone we have on such a topic, well †, already on the forum... )
I agree, it sounds ridiculous. But it's just a model to work out part of the algorithm. Glad I could improve your mood.
If you don't mind throwing a link to ".... someone on this topic, well †, is already on the forum... " plz.
If you don't mind throwing in a link to ".... someone on a topic like this, well †, already on the forum... " please.
And better yet, tell me if you know how to remove elements from a two-dimensional array, which are no longer needed?
Broke my head, the directory wiped to the holes. It's a shame I don't have the brains for it.
how to remove elements from a two-dimensional array that are no longer needed ???
ArrayResize();
Better yet, if you know how to remove elements from a two-dimensional array that are no longer needed.
I've lost my head, I've wiped the reference book to the ground. It's a shame I don't have the brains for it.
Copying of the array "in itself", starting from the position next to the deleted and write starting from the deleted. And then resize as Grigori.S.B suggested
For a 2-dimensional array, multiply the line number to delete by 2. For a 3-dimensional array multiply by 3...ArrayResize();
Good morning, thanks for the reply.
I guess you haven't noticed, you can look above, all the questions were about MQL5.
I understand that the difference is not crucial sometimes, but nevertheless. The function you cited resizes the array, perhaps cutting off extra elements if the size is reduced.
This is not what is needed. You need to remove an element by finding it by value. I tried this function too, I wrote about it in #23. Thanks anyway.