I want to know how to get the closing price of 9th later bar

 

I want to know how to get the closing price of 9th later bar.

which function should I use?

 
iClose: https://docs.mql4.com/series/iClose
 
farrokhfa: I want to know how to get the closing price of 9th later bar.

You can't predict the future. You must wait until 9 periods pass and use Close[1].
If you want 'the closing price of 9th earlier bar' that's easy Close[9]

 
szgy74:
iClose: https://docs.mql4.com/series/iClose

If I want to get closing price of 9th later bar I should write like this? :

  Print("Current bar for USDCHF H1: " iClose("USDCHF",PERIOD_H1,9),";
 
farrokhfa:

If I want to get closing price of 9th later bar I should write like this? :

The current bar is bar 0, the H1 bar an hour ago, in the past, is bar 1, the code you posted will give the close price for USDCHF H1 bar 9 hours ago, in the past.
 
farrokhfa:

If I want to get closing price of 9th later bar I should write like this? :

Yes, or Close[9] for the current chart.

 Print("Current bar for USDCHF H1: ", iClose("USDCHF",PERIOD_H1,9));