McClellanOsc (Function)

image\trumpet2.gif Disclaimer

The McClellanOsc series function calculates the smoothed difference between the New York Stock Exchange Advancing and Declining Issues which is a measure of measure of market breadth .

Syntax

McClellanOsc(AdvIssues, DecIssues, FastLength, SlowLength)

Returns (Double)

A numeric value containing the McClellan Oscillator for the current bar.

Parameters

Name

Type

Description

AdvIssues

Numeric

Specifies which bar value (price, function, or formula) to be considered for the numeric series representing advancing Issues

DecIssues

Numeric

Specifies which bar value (price, function, or formula) to be considered for the numeric series representing declining Issues

FastLength

Numeric

Sets the number of bars used to calculate the exponentially smoothed average of the declining issues

SlowLength

Numeric

Set the number of bars used to calculate the exponentially smoothed average of the advancing issues

Remarks

McClellan Oscillator formations help to identify changes in market direction.

Examples

The McClellan Oscillator calculation is based on the Advancing Issues (plotted in Data1) and the Declining Issues (plotted in Data2). The Advancing issues (Data1) are smoothed by a 39 bar exponential average, while the Declining issues (Data2) are smoothed by a 19 bar exponential average.

Value1 = McClellanOsc(Close of Data1, Close of Data2, 19, 39);

If you wanted a mark on the High of a bar if the McClellan Oscillator became Overbought (greater than 100), you could use the following syntax:

If McClellanOsc(Close of Data1, Close of Data2, 19, 39) > 100 Then
 Plot1(High, "OverBght");