← Back to Library
Momentum

Awesome Oscillator

The Awesome Oscillator (AO) calculates the difference between a 34 Period and 5 Period Simple Moving Averages. It is used to measure market momentum.

Pine Script V6
//@version=6
indicator('Awesome Oscillator', overlay=false)
ao = ta.sma(hl2, 5) - ta.sma(hl2, 34)
plot(ao, 'AO', style=plot.style_columns, color=(ao >= 0 ? (ao < ao[1] ? #26A69A : #B2DFDB) : (ao > ao[1] ? #FFCDD2 : #FF5252)))