This is a ProBuilder code for the “Ultimate Oscillator” included in the standard PRT indicator repertory.
With this code, the Ultimate Oscillator can be used in backtests and automated trading systems.
The Ultimate Oscillator developed by Larry Williams is a smoothed RSI averaging one standard RSI and two other RSIs with doubled and fourfold period length.
The lower indicator in the chart displayed is the manually coded version, the indicator above is the standard version of the PRT platform. Both deliver identical results. In the standard version, the period length cannot be changed and is always fixed to 7.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
//Ultimate Oscillator by Larry Williams BuyPressure = close - min(low, close[1]) TrueRange = TR per = 7 avper = summation[per](BuyPressure) / summation[per](TrueRange) avper2 = summation[per * 2](BuyPressure) / summation[per * 2](TrueRange) avper4 = summation[per * 4](BuyPressure) / summation[per * 4](TrueRange) UltimateOscillator = 100 * ((4 * avper) + (2 * avper2) + avper4) / 7 lowerline = 30 upperline = 70 return UltimateOscillator coloured(0,0,0), lowerline coloured(0,0,255) as "lower line", upperline coloured(0,0,255) as "upper line" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Thanks for sharing this Verdi55.
More instructions from Larry Williams website (and a feature in Stocks & Commodities magazine) —
https://www.ireallytrade.com/newsletters/ULTI.pdf
Our first demand is that we have a price divergence from the oscillator. In the case of a buy we must have had a lower low in price that was not matched by a lower low in the oscillator. In the case of a sell we must have had a higher high in price that was not matched by the oscillator. Secondly, await a trend break in the Ultimate Oscillator to produce the actual signal.
If Short
1. Exit on an opposite signal occurring. You would also be reversing to the long side.
2. Go flat, not reversing, when the Ultimate Oscillator falls to 30% or less. This signal will be early at times but its usage will greatly increase your percent of winners and reduce your number of sleepless nights.
3. Once short, close our your position by going flat any time the index rises above 65%,. This is your initial stop loss.
If Long
1. Exit on an opposite signal occurring. You would also be reversing to the short side.
2. Go flat, not reversing, when the Ultimate Oscillator rises above 70%.
3. Once long, close out your position going flat any time the index falls below 45% after having risen above 50%. This is your stop loss.
All divergence signals must first have seen the index rise above 50% for sell and fallen below 30% for a buy. Divergent patterns that occur without the index first going to these levels are not to be acted upon.