values retrieved from different timeframes are not accurate

#1
Hello Everyone, I am new to this forum.

Having trouble pulling values from daily chart to 3-minute chart. The values are slightly different in 3-minute chart compared to the actual value in daily chart. I use below code in 3-minute chart. it is supposed to display the previous day's OI and RSI(9), it does so but not accurate. could anyone help me to get accurate values from other timeframes?

TimeFrameSet(inDaily);

OID=OI;
RSID=RSI(9);


TimeFrameRestore();

OIDexp=TimeFrameExpand(OID,inDaily);
RSIDexp = TimeFrameExpand (RSID,inDaily);

PlotText("OID=" + WriteVal(OIDexp,fraction), LastValue(BarIndex())-(numbars/Hts)+5, bpI +2, colorBlue);
PlotText("RSID=" + WriteVal(RSIDexp,fraction), LastValue(BarIndex())-(numbars/Hts)+5, bpI -2, colorBlue);