The McClellan oscillator is a market breadth indicator used by financial analysts of the New York Stock Exchange to evaluate the rate of money entering or leaving the market and interpretively indicate overbought or oversold conditions of the market.
Developed by Sherman and Marian McClellan in 1969, the oscillator is computed using the exponential moving average (EMA) of the daily ordinal difference of advancing issues (stocks which gained in value) from declining issues (stocks which fell in value) over 39 trading day and 19 trading day periods.
The simplified formula for determining the oscillator is:
Oscillator = (19 day EMA of Advances minus Declines) - (39 day EMA of Advances minus Declines)
The McClellan summation index (MSI) is calculated by adding each day's McClellan oscillator to the previous day's summation index.
By using the summation index of the mcclellan oscillator, you can judge the markets overall bullishness or bearishness.
above zero it is considered to be bullish (positive growth)
below zero it is considered to be bearish (negative growth)
The Summation Index is oversold at 1000 to 1250 or overbought at 1000 to 1250. 
The number of stocks in a stock market determine the dynamic range of the MSI. For the NZSX (one of the smallest exchanges in the English-speaking world) the MSI would probably range between (50 ... +50), the 19 and 39 constants (used for the US exchanges) would have to be revised. For the NZSX a MSI moving-average mechanism might be needed to smooth out the perturbations of such a small number of traded stocks.
(Information provided by Wikipedia)