Download MetaTrader 5
To add comments, please log in or register
Searching on MQL5.community is performed in all sections. Try it!
alirezaDavid
22
alirezaDavid 2014.07.15 08:52 

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
13593
whroeder1 2014.07.15 12:28  
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 2014.07.15 15:16  

#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