_SECTION_BEGIN("trend indentification");
r = Param("input range",14,10,30,1);
a = ADX(r);
b = a < 20;
d = a >20 AND a < 30;
e = a > 30;
Plot(a,"adx",colorBlue,styleLine|styleNoDraw);
Title = EncodeColor(colorGreen) + "this is a trend identification system : \n" + EncodeColor(colorGreen) + Name() + " " +
EncodeColor(colorYellow)+WriteIf(b , " \nsideways", " ") + EncodeColor(colorGreen) +WriteIf(d,"\ntrending"," ") +EncodeColor(colorBlue) + WriteIf(e," \nstrong trend", " ");
PlotShapes(IIf(d,shapeHollowStar,shapeNone),colorYellow,0,20,0);
PlotShapes(IIf(e,shapeHollowStar,shapeNone),colorGreen,0,20,0);
PlotShapes(IIf(b,shapeHollowStar,shapeNone),colorRed,0,20,0);
Filter =1 ;
AddColumn(a,"adx",1.2);
_SECTION_END();
I hope I have used the code tags properly .
Query:- The code runs fine but i could not relate the line
Plot(a,"adx",colorBlue,styleLine|styleNoDraw);
to plotting shapes lines. If I do not plot the adx , the plotshapes does not show up. What is the relation between the two ?