Aobv Awesome Oscilator

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

//@version=5

indicator(title="[AA][Indicator] AOBV Awesome Oscillator", shorttitle=" AOBV AO",


timeframe="", timeframe_gaps=true)
src = ta.cum(math.sign(ta.change(close)) * volume * math.abs(close - open) / (2 *
(high - low) - math.abs(close - open)))
ao = ta.sma(src,5) - ta.sma(src,34)
diff = ao - ao[1]
plot(ao, color = diff <= 0 ? #F44336 : #009688, style=plot.style_columns)
changeToGreen = ta.crossover(diff, 0)
changeToRed = ta.crossunder(diff, 0)
alertcondition(changeToGreen, title = "AO color changed to green", message =
"Awesome Oscillator's color has changed to green")
alertcondition(changeToRed, title = "AO color changed to red", message = "Awesome
Oscillator's color has changed to red")

You might also like