Trend function

MQL4 라이브러리

작업 종료됨

실행 시간 2 일
피고용인의 피드백
very very nice client :)

명시

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.



파일:

JPG
trend.JPG
162.3 Kb

응답함

1
개발자 1
등급
(414)
프로젝트
670
33%
중재
60
17% / 32%
기한 초과
113
17%
작업중
2
개발자 2
등급
(885)
프로젝트
1410
67%
중재
123
32% / 41%
기한 초과
218
15%
무료
게재됨: 1 코드
3
개발자 3
등급
(29)
프로젝트
49
22%
중재
14
29% / 21%
기한 초과
13
27%
무료
4
개발자 4
등급
(574)
프로젝트
945
47%
중재
309
58% / 27%
기한 초과
125
13%
무료
5
개발자 5
등급
(91)
프로젝트
144
38%
중재
67
15% / 48%
기한 초과
55
38%
무료

프로젝트 정보

예산
20 - 30 USD
기한
에서 2  4 일