from few days i have been trying to correct this very simple formula which helps me find stocks which are making new weekly higher highs and higher lows, however the formula is not working properly. if someone can help me with this, the exploration formula that i have is
=============================================
TimeFrameSet(inWeekly);
HH = High > Ref(High,-1) AND Ref(High,-1) > Ref(High,-2);
HL = Low > Ref(Low,-1) AND Ref(Low,-1) > Ref(Low,-2);
Filter = HH AND HL;
AddColumn(High,"high");
AddColumn(Ref(High,-1) ,"Last Week High");
AddColumn(Ref(High,-2) ,"Previous Week High");
TimeFrameRestore();
=============================================
=============================================
TimeFrameSet(inWeekly);
HH = High > Ref(High,-1) AND Ref(High,-1) > Ref(High,-2);
HL = Low > Ref(Low,-1) AND Ref(Low,-1) > Ref(Low,-2);
Filter = HH AND HL;
AddColumn(High,"high");
AddColumn(Ref(High,-1) ,"Last Week High");
AddColumn(Ref(High,-2) ,"Previous Week High");
TimeFrameRestore();
=============================================