How to access a particular candle in intraday or yesterday

HI
Can anybody help me to write a script to access any particular candle of certain time frame, on same day or previous day.

Regards
Somaraju

Referring to a specific candlestick based on time is not supported on TradeScript.

Use the REF Function to refer to the most recent number of intraday candles.