Trend function

MQL4 Librerie

Lavoro terminato

Tempo di esecuzione 2 giorni
Feedback del dipendente
very very nice client :)

Specifiche

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.



File:

JPG
trend.JPG
162.3 Kb

Con risposta

1
Sviluppatore 1
Valutazioni
(414)
Progetti
670
33%
Arbitraggio
60
17% / 32%
In ritardo
113
17%
In elaborazione
2
Sviluppatore 2
Valutazioni
(885)
Progetti
1410
67%
Arbitraggio
123
32% / 41%
In ritardo
218
15%
Gratuito
Pubblicati: 1 codice
3
Sviluppatore 3
Valutazioni
(29)
Progetti
49
22%
Arbitraggio
14
29% / 21%
In ritardo
13
27%
Gratuito
4
Sviluppatore 4
Valutazioni
(574)
Progetti
945
47%
Arbitraggio
309
58% / 27%
In ritardo
125
13%
Gratuito
5
Sviluppatore 5
Valutazioni
(91)
Progetti
144
38%
Arbitraggio
67
15% / 48%
In ritardo
55
38%
Gratuito

Informazioni sul progetto

Budget
20 - 30 USD
Scadenze
da 2 a 4 giorno(i)