Hi AFL experts,
I use the following nbar AFL which will print an arrow on candles that have a close above last 4 bars .I need help to change the colour of the bars to green when the TRENDUP is printed and all subsequent bars to be green until the TRENdown occurs when candles will turn RED until the signal changes.
n= Param("No. of Bars",4,2,8,1);
TrendUp = C > Ref(HHV(H,n),-1);
TrendDn = C < Ref(LLV(L,n),-1);
TrendUp = ExRem(TrendUp,TrendDn);
TrendDn = ExRem(TrendDn,TrendUp);
PlotShapes(TrendUp*shapeUpArrow,colorGreen);
PlotShapes(TrendDn*shapeDownArrow,colorRed);
Buy= TrendUp;
Sell = TrendDn;
Short=TrendDn;
Cover= TrendUp;
My experience with Amibroker is only few weeks and could not solve this requirement. I greatly appreciate your effort and thank you in advance. I am experimenting by combining with other signals and hence looking for this solution.
I use the following nbar AFL which will print an arrow on candles that have a close above last 4 bars .I need help to change the colour of the bars to green when the TRENDUP is printed and all subsequent bars to be green until the TRENdown occurs when candles will turn RED until the signal changes.
n= Param("No. of Bars",4,2,8,1);
TrendUp = C > Ref(HHV(H,n),-1);
TrendDn = C < Ref(LLV(L,n),-1);
TrendUp = ExRem(TrendUp,TrendDn);
TrendDn = ExRem(TrendDn,TrendUp);
PlotShapes(TrendUp*shapeUpArrow,colorGreen);
PlotShapes(TrendDn*shapeDownArrow,colorRed);
Buy= TrendUp;
Sell = TrendDn;
Short=TrendDn;
Cover= TrendUp;
My experience with Amibroker is only few weeks and could not solve this requirement. I greatly appreciate your effort and thank you in advance. I am experimenting by combining with other signals and hence looking for this solution.