OPEN-SOURCE SCRIPT

BEST Rainbow Chart

19361
Hello traders

This script is a Pinescript adaptation of this FXCM/LUA script

Draws a flexible number of moving averages between 1 and 5 - with a end result looking like a rainbow

Formula

Each Moving Average is defined as a Moving Average of the previous MA
The first MA is based on candle close

MA[1] = MA of Price
MA[2] = MA of MA[1]
....
MA[n]= MA of MA[n-1]


Bonus

You can select the MA type (EMA, SMA, SMMA, TEMA, DEMA, TMA, ALMA, VWMA, ...) and the MA period shared across all the moving averages

Scaling

If you have any issue with your scaling, you may follow this quick tutorial

Hope you'll like it because it looks nice on your chart :)
Dave

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.