Ultimate Oscillator

The Ultimate Oscillator (UO) was developed by Larry Williams in the 1980s. This indicator combines an instrument’s price action during 3 different time frames into one bounded oscillator. The user may change the period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below. Click here for more information.

Ultimate Oscillator1

How To Trade Using Ultimate Oscillator

Adjust the top and bottom guides to control the quantity and quality of the trading signals. If the OU crosses above the top guide a sell signal will be generated. Conversely, if the OU crosses below the bottom guide a buy signal will be given.

Ultimate Oscillator2

How To Access in MotiveWave

Go to the top menu, choose Study>General>Ultimate Oscillator

or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.

Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.

Calculation

//period = user defined, default is 7
//period2 = user defined, default is 14
//period3 = user defined, default is 28
//TL = true low, BP = buying pressure
//TR = true range, prev = previous
//index = current bar number, sig = signal

prevClose = close[index-1];
TL = Math.min(low, prevClose);
BP = close - TL; 
TR = getTrueRange(index); 
// Calculate BPSum1 and TRSum1
sumBP1 = sum(index, period, BP);
umTR1 = sum(index, period, TR);
DIV1 =  sumBP1/sumTR1;
// Calculate BPSum2 and TRSum2
sumBP2 = sum(index, period2, BP);
sumTR2 = sum(index, period2, TR);
DIV2 = sumBP2/sumTR2;
// Calculate BPSum2 and TRSum2
sumBP3 = sum(index, period3, BP);
sumTR3 = sum(index, period3, TR);
DIV3 = sumBP3/sumTR3);
// Now we have enough data to calculate the Ultimate Osc
RawUO = 4*DIV1) + 2*DIV2 + Values.DIV3;
Plot: UO = (RawUO / (4 + 2 + 1)) * 100;
// Signals
buy =  crossedAbove(UO, topGuide);
sell = crossedBelow(UO, bottomGuide);