OPEN-SOURCE SCRIPT

Trend Gradient Moving Average

Updated
This moving average uses a gradient function which calculates the number of advances/declines of the moving average to change the intensity of the colors, meaning a longer trend in either direction will show a stronger color. You can choose 3 colors to build the gradient: a bullish, bearish & neutral/transition color. The number of steps chosen will change the speed of color change, with a lower number of steps meaning a faster transition and viceversa.

Furthermore, you can choose between many different types of moving averages:
-SMA (Simple Moving Average)
-EMA (Exponential Moving Average)
-RMA (Rolling Moving Average)
-WMA (Weighted Moving Average)
-HMA (Hull Moving Average)
-VWMA (Volume Weighted Moving Average)
-TMA (Triangular Moving Average)


Enjoy!
Release Notes
Updated Script to Pinescript V5
gradientMoving AveragesTrend Analysistrendfollowing

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?


@FractalTrade_
Also on:

Disclaimer