Hi,
Hard to say without full code, maybe your indicator is returing you this value : 214783647 (EMPTY_VALUE)?
Try to do this:
1) fill indicator buffer first
2) calculate iMaOnArray in second loop
int i; for (i = Bars-1; i>=0; i--) { ExtUpProb[i] = // stuff } for (i = Bars-1; i>=0; i--) { myMaCalculationsBuffer[i] = iMAOnArray(ExtUpProb,200,14,0,1,i); }
And also allways use "i" when calling iMaOnArray as last parameter, otherwise you will fill your buffer with just last value that comes from calculations.

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,
I am trying to build an indicator and I need an MA on a Buffer I am calculating. For this reason I used the iMAOnArray function. Buffer's field of existence is [0;1] and it also usually never comes above .5.
When trying to get this MA set as:
but it returns to me 0 or BILLIONS in value! (at most a constant value sometimes).
I have declared the container variable, I have initialized it but result is always the same. How could I configure it?
In the indicator's for loop it should be:
Thank you very much!