52 week High in Date Range in Amibroker

49 Views Asked by At

I have a working Amibroker formula which finds stocks which made 52 week high during a period. But this works on the look back period. I provide the number of days to look back.

I want to create the same thing but instead of the look back period it should work on the date range which is put in the Analysis windows "From date to To date."

I was thinking of using something on these lines but can't do anything further.

bir = Status( "barinrange" );
for( i = 0; i < BarCount; i++) {
    a = High of current bar > Ref(HHV(H,current bar-1);
    sum(a,bir);
}

I will be obliged if someone can provide the code.

Thanks,

Pradeep

0

There are 0 best solutions below