Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
ArrayCopy(up_height,hight,0,1,WHOLE_ARRAY); ArrayCopy(height,down_hight,0,1,WHOLE_ARRAY);
You copied [1 … 49] values to [0 … 48]. Why does it surprise you that element 49 is still EMPTY_VALUE?
William Roeder:
You copied [1 … 49] values to [0 … 48]. Why does it surprise you that element 49 is still EMPTY_VALUE?
still the same problem ..

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 can anyone help me interpret the following problem
the idea that I am trying to apply is finding heights between close prices and Weighted moving average.
then I wanted to sort the values by using arraysort function https://docs.mql4.com/array/arraysort , in the following code :
the results with the up-height sorting (the ascending) was good .. no problem
but the down_height gives me very huge number which does not exist at all in millions .. where the close price has only moved few pips above the weighted moving average
probably (>50%) there is something wrong with the code .
but when I used ArrayMaximum function
the same number appeared ... I see that the mql4 reads this number to be the largest height from the past 50 steps