calvincychin: I come into a problem where by when I use the same code in creating indicator and expert advisor, the system give me different result.
- MT5 has no such function. Why did you post your MT4 question in the Root / MT5 EA section instead of the MQL4 section (bottom of the Root page?) General rules and best pratices of the Forum. - General - MQL5 programming forum
- Post real code that compiles. There are no mind readers here
- Buffers are always as series. Make sure your array is before filling it.
whroeder1:
The set series solve the problem. Thanks
- MT5 has no such function. Why did you post your MT4 question in the Root / MT5 EA section instead of the MQL4 section (bottom of the Root page?) General rules and best pratices of the Forum. - General - MQL5 programming forum
- Post real code that compiles. There are no mind readers here
- Buffers are always as series. Make sure your array is before filling it.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi seniors,
I come into a problem where by when I use the same code in creating indicator and expert advisor, the system give me different result.
In indicator, which the result is correct, the following code will give me:-
result = iMAOnArray(priceSeries,0,5,0,MODE_LWMA,0);
input = priceSeries = {100, 100, 100, 100, 86.492, 86.146}
result = 99.099
When I code the same code into expert advisor, it give me different result.
result = iMAOnArray(priceSeries,0,5,0,MODE_LWMA,0);
input = priceSeries = {100, 100, 100, 100, 86.492, 86.146}
result = 66.666
I am having a hard time to file out the root cause. Hope seniors will able to point some light to this problem.
Thank you.