OPEN-SOURCE SCRIPT

Rainbow Moving Averages

This script draws a box tower of moving averages. Each box is a unique color from the rainbow, and there are seven moving averages total. By default, 5, 10, 20, 50, 100, 150, 200 day simple moving averages are used. You could configure the numbers as you wish and also choose EMA, WMA, VWMA, or HullMA. If the price closes at or above a moving average, its box is colored otherwise the box will be gray.
Moving Averagessma

Open-source script

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer