Tâche terminée
Temps d'exécution 2 heures
Commentaires du client
John knows his programming! And he did more than was expected. I can strongly recommend him to anyone who is looking for a programmer.
Commentaires de l'employé
Great customer, prompt communication, clear specs, recommended+
Spécifications
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:

Répondu
1
Évaluation
Projets
995
47%
Arbitrage
33
36%
/
36%
En retard
98
10%
Travail
Publié : 6 codes
2
Évaluation
Projets
136
14%
Arbitrage
43
21%
/
28%
En retard
14
10%
Gratuit
Publié : 2 codes
3
Évaluation
Projets
129
18%
Arbitrage
11
27%
/
55%
En retard
4
3%
Gratuit
4
Évaluation
Projets
236
32%
Arbitrage
30
27%
/
30%
En retard
26
11%
Gratuit
5
Évaluation
Projets
58
33%
Arbitrage
12
42%
/
42%
En retard
7
12%
Gratuit
6
Évaluation
Projets
4
0%
Arbitrage
2
0%
/
100%
En retard
1
25%
Gratuit
7
Évaluation
Projets
280
55%
Arbitrage
0
En retard
5
2%
Gratuit
8
Évaluation
Projets
28
32%
Arbitrage
1
0%
/
0%
En retard
0
Gratuit
Publié : 1 code
9
Évaluation
Projets
24
17%
Arbitrage
15
20%
/
40%
En retard
6
25%
Gratuit
10
Évaluation
Projets
1462
63%
Arbitrage
21
57%
/
10%
En retard
43
3%
Gratuit
11
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
12
Évaluation
Projets
46
28%
Arbitrage
9
0%
/
100%
En retard
7
15%
Gratuit
13
Évaluation
Projets
4
0%
Arbitrage
1
100%
/
0%
En retard
0
Gratuit
Informations sur le projet
Budget
30+ USD
Délais
à 2 jour(s)

