Please help me find the bug in 5 lines of MQL4 code

MQL4 Göstergeler Komut dosyaları

İş tamamlandı

Tamamlanma süresi: 2 saat
Müşteri tarafından geri bildirim
John knows his programming! And he did more than was expected. I can strongly recommend him to anyone who is looking for a programmer.
Geliştirici tarafından geri bildirim
Great customer, prompt communication, clear specs, recommended+

İş Gereklilikleri

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:


 



Yanıtlandı

1
Geliştirici 1
Derecelendirme
(600)
Projeler
935
46%
Arabuluculuk
31
39% / 29%
Süresi dolmuş
93
10%
Serbest
2
Geliştirici 2
Derecelendirme
(87)
Projeler
134
14%
Arabuluculuk
41
22% / 29%
Süresi dolmuş
14
10%
Çalışıyor
3
Geliştirici 3
Derecelendirme
(115)
Projeler
129
18%
Arabuluculuk
11
27% / 55%
Süresi dolmuş
4
3%
Serbest
4
Geliştirici 4
Derecelendirme
(155)
Projeler
224
33%
Arabuluculuk
27
26% / 26%
Süresi dolmuş
23
10%
Serbest
5
Geliştirici 5
Derecelendirme
(45)
Projeler
58
33%
Arabuluculuk
12
42% / 42%
Süresi dolmuş
7
12%
Serbest
6
Geliştirici 6
Derecelendirme
(3)
Projeler
4
0%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
1
25%
Serbest
7
Geliştirici 7
Derecelendirme
(184)
Projeler
199
47%
Arabuluculuk
0
Süresi dolmuş
5
3%
Serbest
8
Geliştirici 8
Derecelendirme
(24)
Projeler
28
32%
Arabuluculuk
1
0% / 0%
Süresi dolmuş
0
Serbest
9
Geliştirici 9
Derecelendirme
(21)
Projeler
24
17%
Arabuluculuk
15
20% / 40%
Süresi dolmuş
6
25%
Serbest
10
Geliştirici 10
Derecelendirme
(1135)
Projeler
1438
62%
Arabuluculuk
21
57% / 10%
Süresi dolmuş
43
3%
Serbest
11
Geliştirici 11
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
12
Geliştirici 12
Derecelendirme
(41)
Projeler
46
28%
Arabuluculuk
9
0% / 100%
Süresi dolmuş
7
15%
Serbest
13
Geliştirici 13
Derecelendirme
(3)
Projeler
4
0%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
0
Serbest
Benzer siparişler
Where are my developers colleagues . i want you to support me on existing work i just need a little addon on it. Am still a student kindly support me. You will be get paid at the end of the work. If you want more details maybe the worth of the project or any other thing let me know. THNAKS FOR THE SUPPORT
** Entry Condition **: - ** For Long**: The trade is entered **after BB + ** is confirmed. - ** For Short *: The trade is entered **after BB -* is confirmed. ### 2nd **Stop Loss **: - ** For long Entries *: stop loss is triggered on a ** candle close above the high* of the breaker block shown by the indicator. - ** For Short Entries **: stop loss is triggered on a ** candle close below the low ** of the breaker block
Hello, am in need of a developer that can help in developing a trading bot that can effectively navigate the foreign exchange (Forex) market or other financial markets to generate passive income. My objective is to create a sophisticated algorithmic trading system that can consistently produce profitable trades with minimal manual intervention. I am seeking a reliable and efficient solution that can be tailored to my
am looking for who help me convert tradingview indicator to mt5 car trading strategy and make sure you are an expert before u apply to this and also my budget for this is 30$ so the name of the indicator is Breaker Blocks with Signals (LuxAlgo) ### 1. ** Entry Condition **: - ** For Long**: The trade is entered **after BB + ** is confirmed. - ** For Short *: The trade is entered **after BB -* is confirmed. ### 2nd
I have a custom MT4 indicator that I need converted to MT5. I'll share the source code with the applicants. Please only apply if you have vast experience in converting complex indicators successfully to MT5, and making sure that the MT5 version functions exactly the same as the MT4 version
I need an expert to help me convert chopzone traingview pinescript to mt4, I need an expert to get it done for me on between 1 to 2 days i hope this will be done by then, i will attach the file and my budget is $30 as of minimum here
Looking for someone to edit/optimize and existing NN (neural network) in my EA so it is more compatible/profitable with the multiple strategies. The expert advisor is a portfolio expert advisor consisting of 33 separate advisors/strategies compiled into one. A NN has been added to the EA but it does not compliment or help the EA's performance. I've attached the original EA (without NN) as well as the EA with the NN
Procuro programador que consiga modificar essas estratégias, com a mesma capacidade de alteração das suas funcionalidades. Reitero, não consegui contato com o programador da fonte, nem mesmo mandando diversas mensagens no telegram! br.tradingview.com/script/PfpFNXyI-Braid-Filter/ br.tradingview.com/script/kv8N05R7-AlphaTrend-Screener/ Ambos os indicadores precisam agir em conjunto, tanto para as funcionalidades em
--- ### Basic Rules for You 1. **Time Management**: - All tasks should be completed within the agreed-upon timeframe. Clear deadlines will be set, and it's essential to adhere to them to ensure smooth progress. 2. **Fixed Budget**: - The budget for this project is fixed. Please ensure that all work done remains within this budget. Any additional costs must be discussed and agreed upon before proceeding. 3
CORREÇÃO NOTIFICAÇÕES Ø O indicador muda a cor dos candles e da MA200 quando ocorre as entradas e é somente nesse momento que ele deve enviar notificação de entrada porem está enviando em outros momentos que não atende as condições conforme imagem abaixo. Ø Sempre que abro o MT5, mudo o time frame ou a plataforma perde conexão o indicador me envia notificações de entradas passadas, o indicador deve enviar

Proje bilgisi

Bütçe
30+ USD
Geliştirici için
27 USD
Son teslim tarihi
to 2 gün