how to get Close Price of previous 500 candle?

 

Hi newbie here,



say current timeframe is H1, 

I want to get past 500 candles close price, how can i do so?

do i need to add some calculation to skip the weekend 2 days in order not to get wrong close price?


Thank you.

 
choockd:

I want to get past 500 candles close price, how can i do so?

iClose(_Symbol,PERIOD_H1,500);
Reason: