Trend function

MQL4 Bibliothèque

Tâche terminée

Temps d'exécution 2 jours
Commentaires de l'employé
very very nice client :)

Spécifications

int Trend (int &candles, int &strenght)

 

The idea is to check if the upper timeframe trend agreed with the indicator on the current timeframe.

I need a function that returns 1 if the trend is positive, otherwise 0, moreover I need that the function can also write in the first parameter (candles) how many candles ago the trend started; in the second parameter, it has to write the strenght of the trend, to understand if is a strong trend and when the trend has started.

How to calculate the strength:Consider the % variation of currency value from the start of the trend.

Suppose that I received a signal in D1 that suggest me to go sell. Through this function I want to check if the trend of the upper timeframes, in this case W1 and MN 1, confirm me that going sell is ok, and also understand when the trend started and how much is its strength.

Thus the result should be the same as the image attached.



Dossiers :

JPG
trend.JPG
162.3 Kb

Répondu

1
Développeur 1
Évaluation
(414)
Projets
670
33%
Arbitrage
60
17% / 32%
En retard
113
17%
Travail
2
Développeur 2
Évaluation
(885)
Projets
1410
67%
Arbitrage
123
32% / 41%
En retard
218
15%
Gratuit
Publié : 1 code
3
Développeur 3
Évaluation
(29)
Projets
49
22%
Arbitrage
14
29% / 21%
En retard
13
27%
Gratuit
4
Développeur 4
Évaluation
(574)
Projets
945
47%
Arbitrage
309
58% / 27%
En retard
125
13%
Gratuit
5
Développeur 5
Évaluation
(91)
Projets
144
38%
Arbitrage
67
15% / 48%
En retard
55
38%
Gratuit

Informations sur le projet

Budget
20 - 30 USD
Délais
de 2 à 4 jour(s)