get 10 first Close bars

 

Hi 

i want take 10 first bars Close Price and write this chunk code

 


  for(int i=1;i<=10;i++)
    {   
       Close[i];
    }


Is this piece of code works correctly??

Tanks 

 
alirezaDavid: i want take 10 first bars Close Price and write this chunk code
  1. First 10 bars or the latest 10?
  2. Latest completed 10 or including the currently forming one?
  3. You're not taking them anywhere with just Close[i];
 

#WHRoeder

 

Hi tanks for answer

i want Latest Completed 10 bar

 

  for(int i=1;i<=10;i++)
    {   
       Alert(Close[i]);
    }

 

Is that true?


Reason: