Работа завершена
Время выполнения 2 часа
Отзыв от заказчика
John knows his programming! And he did more than was expected. I can strongly recommend him to anyone who is looking for a programmer.
Отзыв от исполнителя
Great customer, prompt communication, clear specs, recommended+
Техническое задание
I need help with a small piece of code that calculates the moving average of the Williams Percent Range indicator.
Here is the code:
ArrayResize(WPRArray, WPR_MAPeriod);
for (int j = 0; j < WPR_MAPeriod; j++)
{WPRArray[j] = iWPR(symbol, WPR_Timeframe, WPR_Period, j);
}
double WPR_Average = iMAOnArray(WPRArray, 0, WPR_MAPeriod, 0, WPR_MAMethod, 0);
WPR = DoubleToString(WPR_Average, 0);
It gives different values on the indicator on the chart and the value in the variable calculated for WPR, e.g.
Here the value on the indicator is -52,4541 where the value in the Variable WPR = -73 (rounded off)
And here is another example:
Value of the indicator = -63.5457 but the variable has the value -41(rounded off)
I have researched the issue and found that there is a 12 hour difference where the value in the variable lags the value of the indicator.
Here is a chart over 20 hours of the values of the indi and the var to illustrate:

Откликнулись
1
Оценка
Проекты
995
47%
Арбитраж
33
36%
/
36%
Просрочено
98
10%
Работает
Опубликовал: 6 примеров
2
Оценка
Проекты
136
14%
Арбитраж
43
21%
/
28%
Просрочено
14
10%
Свободен
Опубликовал: 2 примера
3
Оценка
Проекты
129
18%
Арбитраж
11
27%
/
55%
Просрочено
4
3%
Свободен
4
Оценка
Проекты
236
32%
Арбитраж
30
27%
/
30%
Просрочено
26
11%
Свободен
5
Оценка
Проекты
58
33%
Арбитраж
12
42%
/
42%
Просрочено
7
12%
Свободен
6
Оценка
Проекты
4
0%
Арбитраж
2
0%
/
100%
Просрочено
1
25%
Свободен
7
Оценка
Проекты
280
55%
Арбитраж
0
Просрочено
5
2%
Свободен
8
Оценка
Проекты
28
32%
Арбитраж
1
0%
/
0%
Просрочено
0
Свободен
Опубликовал: 1 пример
9
Оценка
Проекты
24
17%
Арбитраж
15
20%
/
40%
Просрочено
6
25%
Свободен
10
Оценка
Проекты
1462
63%
Арбитраж
21
57%
/
10%
Просрочено
43
3%
Свободен
11
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
12
Оценка
Проекты
46
28%
Арбитраж
9
0%
/
100%
Просрочено
7
15%
Свободен
13
Оценка
Проекты
4
0%
Арбитраж
1
100%
/
0%
Просрочено
0
Свободен
Информация о проекте
Бюджет
30+ USD
Сроки выполнения
до 2 дн.

