Ultimate Oscillator

get_ultimate(quotes, short_periods=7, middle_periods=14, long_periods=28)


name type notes
quotes Iterable[Quote] Iterable(such as list or an object having __iter__()) of the Quote class or its sub-class.
Need help with pandas.DataFrame?
short_periods int, default 7 Number of periods (S) in the short lookback. Must be greater than 0.
middle_periods int, default 14 Number of periods (M) in the middle lookback. Must be greater than S.
long_periods int, default 28 Number of periods (L) in the long lookback. Must be greater than M.

Historical quotes requirements

You must have at least L+1 periods of quotes to cover the warmup periods.

quotes is an Iterable[Quote] collection of historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.




name type notes
date datetime Date
ultimate float, Optional Simple moving average


See Utilities and Helpers for more information.


from stock_indicators import indicators

# This method is NOT a part of the library.
quotes = get_history_from_feed("SPY")

# calculate 20-period Ultimate
results = indicators.get_ultimate(quotes, 7, 14, 28)

About Ultimate Oscillator

Created by Larry Williams, the Ultimate Oscillator uses several lookback periods to weigh buying power against true range price to produce on oversold / overbought oscillator. [Discuss] :speech_balloon: