you have to use the proper syntax , mql is similar to c/c++ syntax this means for your case that when ever you have multiple statements to be executed you must use brackets "{" <--start block and "}" < ----end of block, in order to be clear where each statement belongs to.
change this :
Code: Select all
for(int i=limit;i>=0;i--)a[i]=Volume[i]; b[i]=Volume[i];
to this
Code: Select all
for(int i=limit;i>=0;i--){
a[i]=Volume[i];
b[i]=Volume[i];
}
and it will work.
it is a good idea to develop safe habits if you are into programming
one of them is : always write one statement in one line
and a second one : always use brackets even if it is just one line ex:
Code: Select all
for(int i=limit;i>=0;i--){a[i]=Volume[i];}
or even better
Code: Select all
for(int i=limit;i>=0;i--){
a[i]=Volume[i];
}