how can i see 52 Week high an low price of a stack

#2
hi,

any one can tell me how can i see 52 Week high an low price of a stack in amibroker.

jaany
Hello,

You may use the code below.

/*
Define a new variable and use function HHV (highest high value). We use 260 here since 260 days make 52 weeks. For correct 52 week value, it is important that you switch to Daily mode in AmiBroker. What we are doing in code below is actually finding highest high value of 260 "candles".

Repeat the procedure above to find lowest low value for 52 weeks

Then plot these values as lines

*/

High52 = HHV(C,260);
Low52 = LLV(C,260);

Plot(High52,"52-week High", ParamColor("52 week High Color", ColorCycle), ParamStyle("52 week High style"));
Plot(Low52,"52-week Low", ParamColor("52 week Low Color", ColorCycle), ParamStyle("52 week Low style"));

I hope this helps.

Regards,

AmiBroker-India
 

Similar threads