# ANYBODY PLZ HELP ME TO EDIT THIS AFL

#### gopan7805

##### New Member
In this following Afl plz help me to edit.In this chart histogramline which moving abv 10 should be in green(this is already ok now).Moving below -10 only I want in red but in this chart from zero itself it is in red line.I mean the histogram line between -10 to +10 it should be in black color.Plz help me.Thanks in advance

_SECTION_BEGIN("_trending wave");
Hc=(O+H+L+C)/4;
Ho = AMA( Ref( Hc, -1 ), 0.5 );
pds = Optimize("pds ",Param("pds ",4,1,25,1),1,25,1);
myArray = (RSIa((HC), pds )+ RSIa( Ho,pds ) + Ref(RSIa(Ho,pds),-1) + Ref(RSIa(Ho,pds),-2) + Ref(RSIa(Ho,pds),-3))/5 ;
myArrayS = (AMA( myArray , 0.5 )); //smooth
BS = ParamToggle("smooth","No|Yes",1);
BN = ParamToggle("normal","No|Yes",1);

HistInd=myArray - myArrayS ;
if (BS AND BN) Plot(HistInd, _DEFAULT_NAME(),
IIf(HistInd > 10,colorgreen OR HistInd < -10,colorRed ),
if (BS AND BN) Plot(0,"",colorBlack, styleLine|styleDashed | styleThick);
PlotGrid( -5,colorblue );
PlotGrid( 5,colorblue);
PlotGrid( 10,coloryellow );
PlotGrid( -10,coloryellow );

_SECTION_END();

#### Attachments

• 872 bytes Views: 44

#### KingJB76

##### New Member
Is this what you need? Pls check and let me know.

Black when it is between 10 and -10, else it will be either green or red?

#### KingJB76

##### New Member
If yes, then try below modified code:

_SECTION_BEGIN("_trending wave");
Hc=(O+H+L+C)/4;
Ho = AMA( Ref( Hc, -1 ), 0.5 );
pds = Optimize("pds ",Param("pds ",4,1,25,1),1,25,1);
myArray = (RSIa((HC), pds )+ RSIa( Ho,pds ) + Ref(RSIa(Ho,pds),-1) + Ref(RSIa(Ho,pds),-2) + Ref(RSIa(Ho,pds),-3))/5 ;
myArrayS = (AMA( myArray , 0.5 )); //smooth
BS = ParamToggle("smooth","No|Yes",1);
BN = ParamToggle("normal","No|Yes",1);

HistInd=myArray - myArrayS ;
if (BS AND BN) Plot(HistInd, _DEFAULT_NAME(),
IIf(HistInd > 10,colorGreen, IIf(HistInd < -10,colorRed, IIf(HistInd > -10, colorBlack AND HistInd < 10, colorBlack))),
if (BS AND BN) Plot(0,"",colorBlack, styleLine|styleDashed | styleThick);
PlotGrid( -5,colorblue );
PlotGrid( 5,colorblue);
PlotGrid( 10,coloryellow );
PlotGrid( -10,coloryellow );

_SECTION_END();

#### gopan7805

##### New Member
THANK YOU VERYMUCH..ITS WORKING PERFECT NOW.