Hi Guys,
A quick question. I'm trying plot shapes, after a signal is true. For example when price crosses an MA, I would like all the bars after that signal, while the close is above or crosses below the MA
In the example below, The buy signal is plotted, but I would like the bars since that signal trailed by the MA. Hopefully this all makes sense.
_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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
MYma = MA( C, 20 );
Plot(MYma , _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
Buy = Cross(C,myma);
PlotShapes( IIf(Buy , shapeUpArrow, shapeNone ), colorGreen, 0, L, -25);
//Buy_trail = BarsSince(Buy) AND C > MYma;
//PlotShapes( IIf(Buy_trail, shapeUpArrow, shapeNone ), colorGreen, 0, L, -25);
![Trail|690x411](upload://jTka0TgVwXp5cwserAb8Kpv08mV.png)