//////////////////////////////////////////////////////////////////////////////////////////
_SECTION_BEGIN("AD Line");
// Set Background
SetChartBkGradientFill(ParamColor("Bg Top",colorWhite),ParamColor("Bg Bottom",colorLightYellow));
//----------------------------------------------
Buy = Sell = 0;
//----------------------------------------------
AddToComposite( ROC(C,1)>0,"~UpBars","X");
AddToComposite( ROC(C,1) 0, sqrt (Difference),-sqrt (-Difference));
ADLines = Cum(DiffSqrt);
//----------------------------------------------
_SECTION_END();
_SECTION_BEGIN("McClellan");
SetChartOptions(0,chartShowArrows|chartShowDates);
ratio = (Adv -Dec )/(Adv +Dec );
Value = EMA(ratio,19)-EMA(ratio,39);
McClellanOsc = Value*1000;
Plot( McClellanOsc,"McClellan Oscillator =",colorGreen,styleLine| styleThick );
//Plot(0,"",colorWhite,1);
Plot(100,"",colorWhite,1);
Plot(-100,"",colorWhite,1);
Plot(0,"", colorTeal);
Plot(70,"",colorRed,1);
Plot(-70,"",colorGreen,1);
_SECTION_END();
///////////////////////////////////////////////