m_b_round

EMA Gradient

A method of visualising whether an EMA is moving at a faster rate than in previous bars. It uses a linear regression analysis to plot a line of best fit to an exponential moving average of the price (the purple dashed line on the chart).

The gradient of this line of best fit is then compared to the gradient of the line of best fit over a range of previous candles. If the absolute value of the EMA gradient is greater than 75% (configurable) of the set of previous gradients then the line is coloured green for positive gradients and red for negative gradients. A yellow line indicates that the gradient is lower than the threshold.
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?