plot 52week high low afl

rinku4142

Active Member
#1
Hello everybody
i have written a simple afl which plot 52 week high low on price chart even on hourly,15min,5min chart means if abc week high low is 300 and 100 but if u change chart to hourly the 52 week high low will be changed also but it shows real 52 week high low of 300 and 100
use it as overlay on your price chart , if 52 week high low line bother you just right click parameter and click hidden column on style, and style 2
 
#3
Hello everybody
i have written a simple afl which plot 52 week high low on price chart even on hourly,15min,5min chart means if abc week high low is 300 and 100 but if u change chart to hourly the 52 week high low will be changed also but it shows real 52 week high low of 300 and 100
use it as overlay on your price chart , if 52 week high low line bother you just right click parameter and click hidden column on style, and style 2
Good job done
 

Shade

New Member
#4
Hello everybody
i have written a simple afl which plot 52 week high low on price chart even on hourly,15min,5min chart means if abc week high low is 300 and 100 but if u change chart to hourly the 52 week high low will be changed also but it shows real 52 week high low of 300 and 100
use it as overlay on your price chart , if 52 week high low line bother you just right click parameter and click hidden column on style, and style 2
Thanks for the chart.
but can u put it in side of of the chart.
like this
 

Attachments

Shade

New Member
#5
Hello everybody
i have written a simple afl which plot 52 week high low on price chart even on hourly,15min,5min chart means if abc week high low is 300 and 100 but if u change chart to hourly the 52 week high low will be changed also but it shows real 52 week high low of 300 and 100
use it as overlay on your price chart , if 52 week high low line bother you just right click parameter and click hidden column on style, and style 2
Thanks for the chart.
but can u put it in side of of the chart.
 
#6
Thanks for the chart.
but can u put it in side of of the chart.
Hi !

Thanks to Rinku for this wonderful afl. It is very useful.
I have made some changes to the above afl.

It just shows 52-Wk-High-Low on the side of the chart.

Once again, this AFL is not mine. Copy/paste from others.

Cheers !

_SECTION_BEGIN("52-Wk-H-L");
Hclose=HHV(H,252);
Lclose= LLV(L,252);
Sha1 = EncodeColor(colorGreen) + "52-Week-High = " + Hclose + "\n";
Sha2 = EncodeColor(colorRed) + "52-Week-Low = " + Lclose + "\n";
_N(Title = StrFormat("{{NAME}} ({{INTERVAL}}), {{DATE}} ; {{OHLCX}}, V=%1.0f\n {{VALUES}}\n\n", V) + Sha1 + Sha2);
_SECTION_END();
 
#7
What will be the formula for such afl. It must show year high, low and present price and the difference of present price in percentage considering Year low (0%) and Year High (100&). Can anyone help?
 

mastermind007

Well-Known Member
#8
Code:
d=DateTime();
s=SelectedValue(d);
p=DateTimeAdd(s, -1, inYearly);
b=BarsSince((Ref(d,-1)<p) AND (d>=p));
yh=HHV(H,b);
AFL Code above will give you exact 52 week High and it would match with exchange displayed value for most scrips.
 
#9
Code:
d=DateTime();
s=SelectedValue(d);
p=DateTimeAdd(s, -1, inYearly);
b=BarsSince((Ref(d,-1)<p) AND (d>=p));
yh=HHV(H,b);
AFL Code above will give you exact 52 week High and it would match with exchange displayed value for most scrips.
It works fine. But i cant use it in filter. Do you know how to determine the number of bar between date1 and date2?
 

Similar threads