Kindly correct this attached afl. My requirement is show the date of highest and lowest date in entire data base and date of 52 week high and low date.
allhigh = Highest(H);
allLOW = Lowest(L);
dthigh = ValueWhen(H==allhigh, DateTime(),1);
dtLOW = ValueWhen(L==allLOW, DateTime(),1);
n1 = HHV(High,260);
n2 = LLV(L,260);