[blackcat] L1 Mel Widner Rainbow Oscillator

NOTE: Because the originally released script failed to comply with the House Rule in the description, it was banned. After revising and reviewing the description, it is republished again. Please forgive the inconvenience caused.

Level: 1


Mel Widner developed the Rainbow Oscillator and published it in 1997 in the Technical Analysis of Stocks and Commodities magazine.


Mel Widner Rainbow Oscillator helps to predict the changes in the market trend and to follow trends. The oscillator is derived from a consensus of trends that, when plotted in color, has the appearance of a rainbow. It offers only two possible states, the upward and the downward. The Rainbow Oscillator is based on the Rainbow charts trend and is just like the Rainbow Moving Average charts. It works on the basis of a two-period moving average and its graph also helps to identify the highest high value and the lowest low value among moving averages. The Rainbow Oscillator is a simple indicator used to forecast trend reversal. It is a simple yet very important technical analysis tool. The oscillator works on the same rules as does the Rainbow indicator. It uses two simple moving averages, HHV and LLV. The Rainbow Oscillator creates an oscillator with bandwidth lines. Although it is a relatively new indicator but has become very popular for effectively forecasting the changes in the trend direction. The Rainbow Oscillator appears as a director of the trend as it follows the ups and downs of the market. The growing width of the Rainbow indicates that the current trend is likely to continue. The values of the Rainbow Oscillator beyond 80 suggest an unstable market and prone to a sudden reversal of the current market trend. On the other hand, when the prices move to the Rainbow and the Rainbow Oscillator begins to become flat, it indicates that the market is stable and the bandwidth decreases. The Rainbow Oscillator values falling below 20 again indicate an unstable market and also prone to a sudden reversal of the current trend in the market.

In simple words, we can derive the following rules.

  • The Rainbow Oscillator’s wider width suggests a continuation of the current trend.
    The Rainbow Oscillator between -50 and +50 indicates a stable trend.
    When traveling beyond 80, the Rainbow Oscillator suggests an unstable market and a possible reversal of the current trend.
    The Rainbow Oscillator traveling below 20 also indicates instability and a potential reversal of the current market trend.

Key Signal

PosNeg --> Rainbow Oscillator Output.

Labels and alerts are added.


This is a Level 1 free and open source indicator.

Feedbacks are appreciated.


In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

"Win$ & Donate w/ This" Address:
BTC: 1GeuxGE6UUato7AgMnNUjSg56mSzQ6Wxxk
USDT ERC20: 0xfd4d0eb131e81f44530849c1a966cb261dd6bda2
ETH: 0xfd4d0eb131e81f44530849c1a966cb261dd6bda2
LINK: 0xfd4d0eb131e81f44530849