Months close and week close

how to get last week and last month close and compare with close(0) while building inside a scanner which scans every 15 mins?

Thanks @Streak for providing the answer