indicator · own pane · open source

Chaikin Oscillator

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

Chaikin Oscillator subtracts a 10-bar RMA of the A/D line from a 3-bar RMA — turns the cumulative A/D into a swing-style momentum oscillator.

  • Crosses above zero = accumulation accelerating.
  • Crosses below zero = distribution accelerating; divergences with price are the headline setups.

Source code

//@version=5
indicator("Chaikin Oscillator", overlay=false)
fastLen = input.int(3, "Fast RMA length", minval=1, maxval=50)
slowLen = input.int(10, "Slow RMA length", minval=2, maxval=100)
mfm = close == high and close == low or high == low ? 0.0 : ((close - low) - (high - close)) / (high - low)
ad = ta.cum(mfm * volume)
co = ta.rma(ad, fastLen) - ta.rma(ad, slowLen)
hline(0, "Zero", color=color.gray)
p_Chaikin_Osc = plot(co, "Chaikin Osc", color=color.blue, style=plot.style_histogram, linewidth=2)
alertcondition(ta.crossover(co, 0), "Bullish cross", "Chaikin Oscillator crossed above zero")
alertcondition(ta.crossunder(co, 0), "Bearish cross", "Chaikin Oscillator crossed below zero")

Comments

No comments yet.

Sign in to comment.