indicator · own pane · open source
A/D Oscillator indicator
A/D Oscillator is a free open-source indicator by @deepwick. A/D Oscillator subtracts a slow EMA of the A/D line from a fast EMA — converts the… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What A/D Oscillator does
A/D Oscillator subtracts a slow EMA of the A/D line from a fast EMA — converts the cumulative accumulation/distribution into a momentum-style oscillator.
- Above zero = buyers winning; below zero = sellers winning.
- Crossovers are timing tools for the broader trend.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("A/D Oscillator", overlay=false)
fastLen = input.int(3, "Fast EMA length", minval=1, maxval=50)
slowLen = input.int(10, "Slow EMA length", minval=2, maxval=100)
colorLine = input.color("color.blue", "Color Line")
colorNeutral = input.color("color.gray", "Color Neutral")
mfm = close == high and close == low or high == low ? 0.0 : ((close - low) - (high - close)) / (high - low)
ad = ta.cum(mfm * volume)
fast = ta.rma(ad, fastLen)
slow = ta.rma(ad, slowLen)
adosc = fast - slow
hline(0, "Zero", color=colorNeutral)
p_AD_Osc = plot(adosc, "AD Osc", color=colorLine, style=plot.style_histogram, linewidth=2)
alertcondition(ta.crossover(adosc, 0), "A/D bullish cross", "A/D Oscillator crossed above zero")
alertcondition(ta.crossunder(adosc, 0), "A/D bearish cross", "A/D Oscillator crossed below zero")
No comments yet.
Sign in to comment.