Reading close for specific date

Using following code to read close on 14 June 2017

Apply to - my watch list, Range - all quotations

EOD Quotes downloaded from Yahoo

Exploration screen shows no prices

What am I doing wrong?? Using AB 5.0, and ‘yes’ I know it’s old, but so am I!!


// AFL to read close price on 14/June/2017/
// Datenum calculated as being
//(10000 * (2017 - 1900)) + (100 * 6) + 14 = 1170614

Filter = DateNum() == 1170614;

AddColumn (Close, “14 June 2017 Close”);


The code is correct but you need to have data for that particular day in your database.


I’m assuming that there is data in the database because when I point to that date on a chart, the window pops up with the hi, lo, close, etc., values. Would this not be an indication that the close price is in the database? What else could I do to confirm?

Thank you!


I tried your code and it works.
Do you have Periodicity set do Daily?


If you mean am I looking at daily charts vs weekly or monthly, ‘YES’ I’m looking at daily charts.

If there is a Periodicity setting somewhere else, I DON"T KNOW!

Where is the ‘Periodicity’ setting located??



Yep, that is my problem.

Auto Analysis > Settings > General > Periodicity now set to Daily!

Works fine now,

Thank you - you are brilliant!

now if we have to get weekly levels or monthly or yearly how do we do is it possible or DOES it work only for daily period ?

You can get price arrays from other timeframes using TimeFrameGetPrice()