Ultimate Oscillator is a momentum oscillator designed to capture momentum across three different timeframes. The multiple timeframe objective seeks to avoid the pitfalls of other oscillators. Many momentum oscillators surge at the beginning of a strong advance and then form bearish divergence as the advance continues. This is because they are stuck with one time frame. The Ultimate Oscillator attempts to correct this fault by incorporating longer timeframes into the basic formula. Williams identified a buy signal a based on a bullish divergence and a sell signal based on a bearish divergence.
Buying Pressure and its relationship to the True Range forms the base for the Ultimate Oscillator. Williams believes that the best way to measure Buying Pressure is simply subtracting the Close from the Low or the Prior Close, whichever of the two is the lowest. This will reflect the true magnitude of advance, and hence buying pressure. The Ultimate Oscillator rises when Buying Pressure is strong and falls when Buying Pressure is weak.
The Ultimate Oscillator measures momentum for three distinct timeframes. Notice that the second time is double that of the first and the third timeframe is double that of the second. This means the third timeframe is triple that of the first. Even though the shortest timeframe carries the most weight, the longest timeframe is not ignored and this should reduce the number of false divergences. This is important because the basic buy signal is based on a bullish divergence and the basic sell signal is based on a bearish divergence.
There are three steps to a buy signal. First, a bullish divergence forms between the indicator and security price. This means the Ultimate Oscillator forms a higher low as price forges a lower low. The higher low in the oscillator shows less downside momentum. Second, the low of the bullish divergence should be below 30. This is to insure that prices are somewhat oversold or at a relative extremity. Third, the oscillator rises above the high of the bullish divergence.
There are three steps to a sell signal. First, a bearish divergence forms between the indicator and security price. This means the Ultimate Oscillator forms a lower high as price forges a higher high. The lower high in the oscillator shows less upside momentum. Second, the high of the bearish divergence should be above 70. This is to insure that prices are somewhat overbought or at a relative extremity. Third, the oscillator falls below the low of the bearish divergence to confirm a reversal.
The Ultimate Oscillator can be used on intraday, daily, weekly or monthly charts. It is sometimes necessary to adjust the parameters to generate overbought or oversold readings, which are part of the buy and sell signals. Relatively docile stocks or securities may not generate overbought or oversold readings with the default parameters (7,14,28). Chartists need to increase sensitivity with shorter timeframes. The chart for Boeing (BA) shows the Ultimate Oscillator (7,14,28) trading between 30 and 70 for six months. There were no overbought or oversold readings. Shortening the timeframe to (4,8,16) increased sensitivity and generated at least six overbought or oversold readings. The opposite is true for securities with high volatility. It is sometimes necessary to lengthen the timeframes to reduce sensitivity and the number of signals.
The Ultimate Oscillator is a momentum oscillator that incorporates three different timeframes. Traditional signals are derived from bullish and bearish divergence, but chartists can also look at actual levels for a trading bias. This usually works better with longer parameters and longer trends. For example, the Ultimate Oscillator (20,40,80) and price trend favors the bulls when above 50 and the bears when below 50. As with all indicators, the Ultimate Oscillator should not be used alone. Complementary indicators, chart patterns and other analysis tools should be employed to confirm signals.
//+------------------------------------------------------------------+ //| Ultimate Oscillator.mq4 | //| Copyright © 2007, MetaQuotes Software Corp. | //| http://www.metaquotes.ru/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2007, MetaQuotes Software Corp." #property link "http://www.metaquotes.ru/" //---- #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Blue #property indicator_level1 30 #property indicator_level2 70 #property indicator_levelcolor Blue //#property indicator_maximum 100 //#property indicator_minimum 0 //---- input parameters extern int fastperiod = 7; extern int middleperiod = 14; extern int slowperiod = 28; extern int fastK = 4; extern int middleK = 2; extern int slowK = 1; //---- buffers double UOBuffer[]; double BPBuffer[]; double divider; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators string name; name="UOS(" + fastperiod + ", " + middleperiod + ", " + slowperiod + ")"; IndicatorBuffers(2); SetIndexStyle(0, DRAW_LINE); SetIndexBuffer(0, UOBuffer); SetIndexDrawBegin(0, slowperiod); SetIndexBuffer(1, BPBuffer); IndicatorShortName(name); IndicatorDigits(1); divider = fastK + middleK + slowK; //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(); //---- int i, limit, limit2; double TL, RawUO; if(counted_bars == 0) { limit = Bars - 2; limit2 = Bars - slowperiod; } if(counted_bars > 0) { limit = Bars - counted_bars; limit2 = limit; } for(i = limit; i >= 0; i--) { TL = MathMin(Low[i], Close[i+1]); BPBuffer[i] = Close[i] - TL; } for(i = limit2; i >= 0; i--) { RawUO = fastK*iMAOnArray(BPBuffer, 0, fastperiod, 0, MODE_SMA, i) / iATR(NULL, 0, fastperiod, i) + middleK*iMAOnArray(BPBuffer, 0, middleperiod, 0, MODE_SMA, i) / iATR(NULL, 0, middleperiod, i) + slowK*iMAOnArray(BPBuffer, 0, slowperiod, 0, MODE_SMA, i) / iATR(NULL, 0, slowperiod, i); UOBuffer[i] = RawUO / divider*100; } //---- return(0); } //+------------------------------------------------------------------+
Comments