Trend function

MQL4 Bibliotecas

Trabalho concluído

Tempo de execução 2 dias
Comentário do desenvolvedor
very very nice client :)

Termos de Referência

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.



Arquivos anexados:

JPG
trend.JPG
162.3 Kb

Respondido

1
Desenvolvedor 1
Classificação
(414)
Projetos
670
33%
Arbitragem
60
17% / 32%
Expirado
113
17%
Trabalhando
2
Desenvolvedor 2
Classificação
(885)
Projetos
1410
67%
Arbitragem
123
32% / 41%
Expirado
218
15%
Livre
Publicou: 1 código
3
Desenvolvedor 3
Classificação
(29)
Projetos
49
22%
Arbitragem
14
29% / 21%
Expirado
13
27%
Livre
4
Desenvolvedor 4
Classificação
(574)
Projetos
945
47%
Arbitragem
309
58% / 27%
Expirado
125
13%
Livre
5
Desenvolvedor 5
Classificação
(91)
Projetos
144
38%
Arbitragem
67
15% / 48%
Expirado
55
38%
Livre

Informações sobre o projeto

Orçamento
20 - 30 USD
Prazo
de 2 para 4 dias