period: 1 day
(assume trade 7 days a week)
Date - Highest High in past 3 days
1/12 - 2655
1/13 - 2641
1/14 - 2621
1/15 - 2621
1/16 - 2601
1/17 - 2587
1/18 - 2577
1/19 - 2573 (current day)
How I get highest High in past 3 days: MAX(High, 3)[0]
Now, I am in current day (1/19). I would like to get Highest High on 1/18, 1/16, 1/14
What I tried to get Highest in past 3 days for 1/18:
MAX(Highs[1],3)[0]
But apparently it is not working. Highs don't work that way.
What other function I can use?
Thanks.
Comment