use iMAonArray for volume

ali88005
12
ali88005  
double arrayvolume[];
double frist_eem=0;
double sum_ema_frist=0;
ArrayResize(arrayvolume,101);

for(int i=0;i<=100;i++)
{
arrayvolume[i]=(double)iVolume(NULL,PERIOD_M5,i);
}

Print(arrayvolume[10]);

Print(iMAOnArray(arrayvolume,0,10,0,MODE_EMA,0));===>>>error array out of range

hello every one i use array for save volume .when i pass this array to MAonArray and after I use this exert on chart .i see error array out of range but when i comment MAonArray function and print array I have n't problem .can you help me?

Files:
erroe.PNG  18 kb
Keith Watford
Moderator
30306
Keith Watford  
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.