Need QS farmula to be converted to afl

I need this Quantshare formula to be converted to afl can some one help.?


a = hhv(close, 200);

b = ((a / close) - 1) * 100;

filter = b < 1; // Near all time highs

Please help me convert this to an afl



Seems to be you already have coded most of your requirements. Add a piece of code so as to enable you to run the exploration. Here is the complete code as per requirement.



Plot( C, "Close",  colorDefault , styleNoTitle  | GetPriceStyle() ); 

a= HHV(Close,200);

b = ((a/Close)-1)*100;

Filter = b<1;

AddColumn(a, "a",1.2); 
AddColumn(b, "b",1.2); 

Title = "\n Breakout strategy\n\n"+
"a:              "+NumToStr(a,1.2)+"\n"+
"b:              "+NumToStr(b,1.2)+"\n";

How to apply this in PI.
I’m new user of it. Can you please guide me
Will it work for all the scripts. I mean do it automatically indicate which stock is giving breakout.