Hi Derek,
Found Reference to http://www.traderslaboratory.com/forums/trading-indicators/7319-ew-oscillator-breaking-bands.html and corrected as follows
_SECTION_BEGIN("EW Oscillator Breaking Bands");
/***
Reference to Picture in:
http://www.traderslaboratory.com/forums/trading-indicators/7319-ew-oscillator-breaking-bands.html
--Converted by Kelvinhand --
***/
K=1;
K2=0.0555;
Len=5;
//--
MP = (H+L)/2;
Price1 =ma(MP,5) - ma(MP,35) ;
AvgP = ema(Price1,Len);
clr = IIf(AvgP > 0, colorrgb(183,179,142), IIf(AvgP < 0, colorrgb(110,136,177), colorGrey50));
Plot(AvgP, "AvgP", clr, styleNoLabel|styleHistogram|styleThick);
clr = IIf(Price1 > 0, colorYellow, IIf(Price1 < 0, colorBlue, colorGrey50));
Plot(Price1, "Osc535", clr, styleNoLabel|styleHistogram|styleThick);
for(i=0; i<40; i++)
UpperBand[i] =LowerBand[i]= Price1[i];
for(i=40; i<BarCount; i++)
{
if (Price1[i]>0)
{
UpperBand[i] = UpperBand[i-1]+ K2*(K*Price1[i] - UpperBand[i-1]);
LowerBand[i] = LowerBand[i-1];
}
else
{
UpperBand[i] = UpperBand[i-1];
LowerBand[i] = LowerBand[i-1]+ K2*(K*Price1[i] - LowerBand[i-1]);
}
}
Plot(UpperBand, "upper", colorWhite, styleNoLabel);
Plot(LowerBand, "lower", colorWhite, styleNolabel);
PlotGrid(0, colorWhite );
_SECTION_END();
Attached Picture of the indicator in Amibroker: