ANYBODY PLZ HELP ME TO EDIT THIS AFL

#1
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 ),
ParamStyle("LineStyle",stylehistogram|styleLine|styleThick,maskAll));
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

#3
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))),
ParamStyle("LineStyle",stylehistogram|styleLine|styleThick,maskAll));
if (BS AND BN) Plot(0,"",colorBlack, styleLine|styleDashed | styleThick);
PlotGrid( -5,colorblue );
PlotGrid( 5,colorblue);
PlotGrid( 10,coloryellow );
PlotGrid( -10,coloryellow );

_SECTION_END();
 

Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Name:Phone:
Email:City:
State:
Are you a day trader?