++ HAS STOPPED WORKING

 

here is a sample indicator. you can see that ++ does not work. the buffer should rise one integer for every bar over time.

Files:
test.mq4  3 kb
 
   for(int i=limit; i>=0; i--)
      {
      int grount; // ?????
      grount++;
      BufferD[i]=grount;
      }
 
qjol:


There must be something wrong with my computer
 
Mom_markets:
There must be something wrong with my computer

Or maybe MetaEditor is the old version?
 

nothing is wrong with the computer

it's the code

for(int i=limit; i>=0; i--)
{
int grount; // this line doesn't belong here put it outside the start section or make it static
grount++;
BufferD[i]=grount;
}

 

or just put it outside the for loop. You should also initialize it. Latest version mql4 requires variables to be initialized before they are used.

 

ok, that worked. now to change every indicator i ever made. not such a good update. I have been very impressed that I have not had to do this more often. thanks for the help!

1

Reason: