The first four arguments must be arrays: 'close' contains the close values, 'high' contains the high values, 'low' contains the low values, 'volume' contains the volumes.
The 'shortPeriod' and 'longPeriod' parameters are the periods for the exponential moving averages. The recommended values for these parameters are respectively 3 and 10.
The Chaikin Oscillator is a moving average oscillator based on the Accumulation/Distribution indicator. It is calculated by subtracting a 10 day exponential moving average from a 3 day exponential moving average of the Accumulation Distribution line. In other words the Chaikin Oscillator is simply the Moving Average Convergence Divergence indicator (MACD) applied to the Accumulation/Distribution Line.
The Chaikin Oscillator can be used to monitor the flow of money in and out of the market - comparing money flow to price movement helps to identify tops and bottoms in short and intermediate cycles.