Use an array function to perform a task in my code (Fixed budget $30)

MQL4 Experts Autre

Tâche terminée

Temps d'exécution 6 jours
Commentaires du client
Excellent work
Commentaires de l'employé
Thank you

Spécifications

Hello, I need someone to help solve a shortfall in my code using (Array). It should be simple and I'll be happy if you can get it done in a few hrs.

THE ISSUE:

I have coded a Partial Closure function that is expected to close (x% lots) off every trade running on the account having a specified Magic No. only when the net profit of these trades hit a stated max DD of Account Balance. (Symbol of trades doesn't matter).


I have observed that the function sometimes closes a ticket by the (x% lots) and the before loop finishes, it again closes (x% lots) off the resultant position from the initial one probably because it sees this new resultant ticket just as one of the old trades. This makes everything random and I want a solution....


My solution:

Developer should create an Array so that when maxDD is hit, this Array is populated with all existing tickets. If the partial closure function starts, the loop should then handle only the tickets found in the Array. This way, I believe the problem could be solved.

I'll share my code with the selected dev. and am also open to any other ideas or solutions....thanks!

Répondu

1
Développeur 1
Évaluation
(99)
Projets
138
51%
Arbitrage
5
40% / 60%
En retard
0
Travail
2
Développeur 2
Évaluation
(443)
Projets
570
37%
Arbitrage
106
39% / 33%
En retard
17
3%
Gratuit
3
Développeur 3
Évaluation
(212)
Projets
275
21%
Arbitrage
25
52% / 16%
En retard
0
Travail
4
Développeur 4
Évaluation
(36)
Projets
45
2%
Arbitrage
6
33% / 17%
En retard
1
2%
Gratuit
5
Développeur 5
Évaluation
(75)
Projets
111
50%
Arbitrage
26
31% / 50%
En retard
9
8%
Gratuit
Publié : 2 articles
6
Développeur 6
Évaluation
(1)
Projets
1
0%
Arbitrage
0
En retard
0
Gratuit
7
Développeur 7
Évaluation
(257)
Projets
341
58%
Arbitrage
7
14% / 71%
En retard
9
3%
Gratuit
8
Développeur 8
Évaluation
(322)
Projets
499
67%
Arbitrage
5
40% / 0%
En retard
4
1%
Gratuit
Publié : 8 codes
9
Développeur 9
Évaluation
(83)
Projets
97
32%
Arbitrage
9
22% / 56%
En retard
5
5%
Travail

Informations sur le projet

Budget
30+ USD
Délais
de 1 à 2 jour(s)