How to get Yesterday ATR or RSI of daily timeframe in today intraday chart?

@Tomasz
Is the below formula correct to get Yesterday ATR or RSI of daily timeframe in today intraday chart ?

TimeFrameSet(inDaily);

YATRp = Param("ATR Period", 10, 2, 100, 1 );
YATR = ATR(YATRp);
YATRYesterday = Ref(YATR, -1);

TimeFrameRestore();

YATRYesterday = TimeFrameExpand(YATRYesterday, inDaily, expandLast);

"Yesterday ATR Value" +YATRYesterday;

Yes the formula given above is correct.