Download MetaTrader 5

get 10 first Close bars

To add comments, please log in or register
alirezaDavid
22
alirezaDavid  

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 

whroeder1
15719
whroeder1  
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];
alirezaDavid
22
alirezaDavid  

#WHRoeder

 

Hi tanks for answer

i want Latest Completed 10 bar

 

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

 

Is that true?


To add comments, please log in or register