Insert variable in technical indicator

 

Hey there,

i am trying to get a variable as a value into my indicator:

   for ( i ; i < 7 ; i++ )
   {
      // Define important variables
      double iADX_plus_previous = iADX(NULL,0,14,PRICE_CLOSE,MODE_PLUSDI,i);
   }

But "i" always returns 0, why?


Greetings!

 
for (i = 0; ....