Fetch previous day's closing price in AFL

Intraday settings in my database in Amibroker is set to "Allow mixed EoD/Intraday data". Consider Nifty Futures as an example. I can see in Quote Editor that LTP of previous is 8226.15 with a date timestamp of 09-06-2016 15:30:00. There is another entry for the daily bar with Closing Price (this is adjusted closing price) of 8229.35 without any timestamp; it just has a date of 09-06-2016 without any timestamp.

I need to fetch previous day's Closing price in my AFL (8229.35 in this example). However the AFL code is fetching LTP of previous day rather than Closing price of previous day, even though both these entries are present in the database. I tried using 3 different methods and none of them returns Closing price (8229.35) and it returns LTP (8226.15).

I used below code in AFL to fetch Closing price of previous day on Daily time frame.

Option 1: DayC = TimeFrameGetPrice("C", inDaily, -1);

Option 2: DayC1 = SelectedValue(TimeFrameGetPrice("C", inDaily, -1));

Option 3: Timeframeset(Indaily);
eodprice = Ref(Close, -1);

Is there a way I can read previous day's clsing price rather than LTP in a database set to mixed mode, while working in 5 min time frame?


For the above requirement check the AFL function for previous days OHLC

PrevLow = Ref(L,-1) 
PrevHigh = Ref(H,-1)