Not able to use past data....

I am trying to use the following functions to get previous day high/ low/ open/ close.

TimeFrameGetPrice( "C", inDaily, shift = -1, mode = expandFirst );

Ref(Close,-1);

I am presently using trial version. Can we do this in trial version?. None of the above functions seem to be working.

@klivish i don't know about the trial version but perhaps try this

PrevDayH = IIf( LastDay, TimeFrameGetPrice( "H", inDaily, -1 ), Null );
PrevDayL = IIf( LastDay, TimeFrameGetPrice( "L", inDaily, -1 ), Null );


SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 

Plot( PrevDayH, "", colorBlue, styleThick );
Plot( PrevDayL, "", colorRed, stylethick );

And perhaps review the Expand point principles and experiment with them to see how your results change,

mode - one of available modes:
expandLast - the compressed value is expanded starting from last bar within given period (so for example weekly close/high/low is available on Friday's bar)
expandFirst - the compressed value is expanded starting from first bar within given period (so for example weekly open is available from Monday's bar)
expandPoint - the resulting array gets not empty values only for the last bar within given period (all remaining bars are Null (empty)).