52-week high/low scan

Scanning stocks that have touched their 52-week high OR 52-week low, 52-weeks consists of 260 trading days. We’ll be using our Min/Max functions with the duration of 260 days along with the “high/low” stock attribute to filter such stocks.

1 day ago max(..) in this context relates to the max function, which calculates the maximum based on the latest high (you can also calculate the maximum a day ago using a offset of 1/2/3.. for the parameters in the max)

In this case, its the same and would produce the same results. The ability to have a offset for min/max function allows you to control the dataset for all measures that are within the function. So, you can have a filter like, “close greater than 1 day ago max(20, Latest open + 1 day ago high)”

I want to know whether todays low is lower than the lows of previous 5 days, so i have written following scan function but its not showing any result. Is it written correctly, please let me know.Thanks

How to use Max and Min function?
Inside of Max function (Duration,Value) what it is described, what is the outcome of parameter?
If I pass
Latest max(5, latest close) what is the meaning of entire function?

Calculate the range between the true high of the last two days and the true low of the last two days
2. Calculate this true range in two day blocks for the previous three occasions
3. Current range is lower than the previous three ranges

Thanks for sharing the post. The way you narrated the post is good and understanding. After reading this post and the links you provide in comments I learned some new things. Keep posting. Please let me know for the upcoming posts.

Hi,
This is not giving correct scans as you have not put BRACKET before dividing by 3. So, it is dividing by 3 only last entry and not sum of all 3 entries. I think you should put a Bracket for sum of 3 (High,Low,Close) and then divide by 3. When I tried with Bracket it is giving error. Can you redo and post.