_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Price 131");
HiDay = TimeFrameGetPrice("H", inDaily);
LoDay = TimeFrameGetPrice("L", inDaily);
HiHrly = TimeFrameGetPrice("H", inHourly);
LoHrly = TimeFrameGetPrice("L", inHourly);
PlotShapes(shapeSmallCircle*(H==HiDay),colorDarkRed,0 ,H,20);
PlotShapes(shapeSmallCircle*(L==Loday),colorDarkGreen,0 ,L,-20);
Title =
EncodeColor(colorBlack)+ "Hi-Lo" + " | " + Name() + " | " + EncodeColor(colorBlack)+ Interval(2)
+ EncodeColor(colorBlack) + " | " + Date() +" | "
+"\n"+EncodeColor(1) +"Open ="+O +","+" High ="+H +" ,"+" Low ="+L +","+ " Close ="+C + " | Volume : "+ WriteVal(V,1.0)+
"\n"+ EncodeColor(colorBlack)+"\n"+
EncodeColor(colorBlack) + "Day's Range = " + EncodeColor(colorBlack) + StrToNum(NumToStr((HiDay - LoDay), 1.2))+ "\n"+
EncodeColor(colorBlack) + "Day's Hi = " + EncodeColor(colorBlack) + Hiday + "\n" +
EncodeColor(colorBlack) + "Day's Lo= " + EncodeColor(colorBlack) + Loday ;
DayH = TimeFrameGetPrice("H", inDaily, -1); DayHI = LastValue (DayH,1);// yesterdays high
DayL = TimeFrameGetPrice("L", inDaily, -1); DayLI = LastValue (DayL,1); // yesterdays low
DayC = TimeFrameGetPrice("C", inDaily, -1); // yesterdays close
DayO = TimeFrameGetPrice("O", inDaily); // current day open
numbars = LastValue(Cum(Status("barvisible")));
hts = -33.5;
YHL = 1;
if(YHL==1) {
Plot(DayL,"YL",colorTurquoise,styleNoLine|styleNoLine|styleNoRescale|styleNoTitle);
Plot(DayH,"YH",colorTurquoise,styleNoLine|styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" YH " , LastValue(BarIndex())-(numbars/Hts), DayHI, colorBlack);
PlotText(" YL " , LastValue(BarIndex())-(numbars/Hts), DayLI, colorBlack);
}
_SECTION_END();
_SECTION_BEGIN("Price 131");
HiDay = TimeFrameGetPrice("H", inDaily);
LoDay = TimeFrameGetPrice("L", inDaily);
HiHrly = TimeFrameGetPrice("H", inHourly);
LoHrly = TimeFrameGetPrice("L", inHourly);
PlotShapes(shapeSmallCircle*(H==HiDay),colorDarkRed,0 ,H,20);
PlotShapes(shapeSmallCircle*(L==Loday),colorDarkGreen,0 ,L,-20);
Title =
EncodeColor(colorBlack)+ "Hi-Lo" + " | " + Name() + " | " + EncodeColor(colorBlack)+ Interval(2)
+ EncodeColor(colorBlack) + " | " + Date() +" | "
+"\n"+EncodeColor(1) +"Open ="+O +","+" High ="+H +" ,"+" Low ="+L +","+ " Close ="+C + " | Volume : "+ WriteVal(V,1.0)+
"\n"+ EncodeColor(colorBlack)+"\n"+
EncodeColor(colorBlack) + "Day's Range = " + EncodeColor(colorBlack) + StrToNum(NumToStr((HiDay - LoDay), 1.2))+ "\n"+
EncodeColor(colorBlack) + "Day's Hi = " + EncodeColor(colorBlack) + Hiday + "\n" +
EncodeColor(colorBlack) + "Day's Lo= " + EncodeColor(colorBlack) + Loday ;
DayH = TimeFrameGetPrice("H", inDaily, -1); DayHI = LastValue (DayH,1);// yesterdays high
DayL = TimeFrameGetPrice("L", inDaily, -1); DayLI = LastValue (DayL,1); // yesterdays low
DayC = TimeFrameGetPrice("C", inDaily, -1); // yesterdays close
DayO = TimeFrameGetPrice("O", inDaily); // current day open
numbars = LastValue(Cum(Status("barvisible")));
hts = -33.5;
YHL = 1;
if(YHL==1) {
Plot(DayL,"YL",colorTurquoise,styleNoLine|styleNoLine|styleNoRescale|styleNoTitle);
Plot(DayH,"YH",colorTurquoise,styleNoLine|styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" YH " , LastValue(BarIndex())-(numbars/Hts), DayHI, colorBlack);
PlotText(" YL " , LastValue(BarIndex())-(numbars/Hts), DayLI, colorBlack);
}
_SECTION_END();
This AFL is showing just today range, i am in need of afl which shows yesterday range & average of last 5 trading session & average of last 20 trading session on screen.
so i can compare how much movement more left in script.
for example if daily range of silver is 800 point & if i can see today it moved just 400 point till eve, i will buy it above high or sell below low for 400 pt tgt.
but current afl showing just today range, can u help pls.
THKS