The McClellan Oscillator is a breadth indicator derived from Net Advances, the number of advancing issues less the number of declining issues. The McClellan Oscillator is similar to a MACD for the Advance/Decline Line for the NYSE. Signals can be generated with breadth thrusts, centerline crossovers, overall levels and divergences.
study("NYSE MCCLELLAN OSCILLATOR") ADV=security("ADVN",period,close) DEC=security("DECN", period,close) RANA=1000*((ADV-DEC)/(ADV+DEC)) MA1=ema(RANA,19), MA2=ema(RANA,39) MCC=MA1-MA2 plot(MCC, color=black, title="MCL Osc", linewidth=3) hline(0,color=black, linestyle=dotted, title="0 line")