OPEN-SOURCE SCRIPT

[code-piece] change plotted color with input()

Updated
plotted colored moving average.

Plotted color can be changed by indicator's setting dialog.
It's useful for user to be able to change the color according to background color.

1 = red
2 = blue
3 = green
4 = yellow
5 = lime
6 = aqua
7 = orange
8 = white
other = black
Release Notes
Updated to Pine V4.
movingMoving Averages

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