ChaikinOsc
ChaikinOsc in ProBuilder returns the Chaikin Oscillator, the difference between fast and slow EMAs of the Accumulation/Distribution line. Syntax, examples.
Syntax
ChaikinOsc[shortPeriod, longPeriod](price)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
shortPeriod | integer | 3 | Period of the fast exponential average applied to the Accumulation/Distribution line. |
longPeriod | integer | 10 | Period of the slow exponential average applied to the same line. |
price | price source | close | Price series passed to the underlying calculation, such as close or open. |
Formula
AD = cumulative sum of Volume * ((Close - Low) - (High - Close)) / (High - Low)
ChaikinOsc = EMA[shortPeriod](AD) - EMA[longPeriod](AD)The construction mirrors a MACD, but applied to the Accumulation/Distribution line instead of price. The oscillator therefore measures the momentum of money flow rather than the momentum of price.
How it works
The Accumulation/Distribution line accumulates volume according to where each bar closes within its range, producing a slow-moving picture of buying and selling pressure. The Chaikin Oscillator takes the derivative of that picture: by subtracting a slow EMA of the line from a fast one, it shows whether money flow is currently accelerating or decelerating.
A positive oscillator means the A/D line is rising faster than its recent norm, in other words, accumulation is picking up. A negative value means distribution is picking up. Crossings of the zero line mark the points where the short-term flow trend overtakes the longer-term one in either direction.
The indicator's best-known application is divergence analysis. When price prints a new low but the oscillator holds above its previous low, selling pressure is weakening beneath the surface, a bullish divergence. The bearish mirror image applies at new price highs. Direction changes of the oscillator itself, without a zero cross, are also watched as early hints that a flow trend is maturing.
Volume data is a hard requirement. Instruments without meaningful volume from the data feed produce a flat or unreliable oscillator.
Examples
Example 1, Standard Chaikin Oscillator plot (Indicator)
// 3-period vs 10-period EMA of the A/D line, based on the open price
ChOsc = ChaikinOsc[3, 10](open)
RETURN ChOsc coloured(86,190,140)The default 3 and 10 configuration. Plotted in a separate panel, zero-line crossings and divergences against price are the main features to read.
Example 2, Zero-line cross with trend filter (ProOrder)
// Long when money-flow momentum turns positive in an uptrend
co = ChaikinOsc[3, 10](close)
trend = close > Average[100](close)
IF NOT LongOnMarket AND trend AND co CROSSES OVER 0 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
IF LongOnMarket AND co CROSSES UNDER 0 THEN
SELL AT MARKET
ENDIFEnters when accumulation momentum turns positive while price trades above its 100-bar average, and exits on the opposite cross. The trend filter suppresses the frequent zero crossings that occur in flat markets.
Example 3, Screening for positive flow momentum (ProScreener)
// Instruments where money-flow momentum just turned positive
co = ChaikinOsc[3, 10](close)
turned = co > 0 AND co[1] <= 0
SCREENER[turned](co AS "Chaikin Osc")Returns instruments whose Chaikin Oscillator crossed above zero on the current bar, a candidate list for volume-confirmed upturns.
Interpretation
| Observation | Reading |
|---|---|
| Oscillator above zero | Short-term money flow is stronger than the longer-term baseline, accumulation is accelerating. |
| Oscillator below zero | Distribution is accelerating. |
| Bullish divergence at price lows | New price low without a new oscillator low, selling pressure fading. |
| Bearish divergence at price highs | New price high without a new oscillator high, buying pressure fading. |
Zero crossings are frequent on short settings, so most workflows treat them as confirmation for signals generated elsewhere rather than as standalone entries.
Common errors and gotchas
- Period order is short first. The signature is
ChaikinOsc[shortPeriod, longPeriod]. WritingChaikinOsc[10, 3]flips the sign of every reading and inverts all zero-cross logic without any compile error. - Volume-dependent. The oscillator is built on the Accumulation/Distribution line, which needs volume. On feeds without real traded volume, the output reflects tick counts or nothing at all.
- Not a price oscillator. Despite the MACD-like shape, the input is the A/D line. Overbought and oversold levels borrowed from price oscillators do not transfer; the useful references are the zero line and the oscillator's own history.
- Choppy around zero. With the default 3 and 10 periods, sideways markets produce rapid alternating crossings. A trend filter or a minimum-magnitude threshold removes most of the noise trades.
Related instructions
AccumDistr, the Accumulation/Distribution line the oscillator is built on.OBV, cumulative volume line using whole-bar direction.MoneyFlowIndex, bounded volume-weighted oscillator, 0 to 100.MoneyFlow, bounded money-flow measure between -1 and 1.ExponentialAverage, the smoothing method used on both legs.ForceIndex, price change multiplied by volume.PVT, price-volume trend line.VolumeOscillator, the same fast-minus-slow construction applied to raw volume.
