Madrid Moving Average Ribbon

This plots a moving average ribbon, either exponential or standard. It provides an easy and fast way to determine the trend direction and possible reversals.
Lime : Uptrend. Long trading
Maroon : Reentry (buy the dip) or downtrend reversal warning
Red : Downtrend. Short trading
Green : Short Reentry (sell the peak) or uptrend reversal warning

To best determine if this is a reentry point or a trend reversal the MMARB (Madrid Moving Average Ribbon Bar) study is used. This is the bar located at the bottom. This bar signals when a current trend reentry is found (partially filled with opposite dark color) or when a trend reversal is ahead (completely filled with opposite dark color).

This study requires no parameters, and it can be used on any time frame.

I hope this effort can help you in your trading.
Release Notes: Madrid MA Ribbon is upgraded from its original Pinescript v1 code to a compliant Pinescript v4 code.
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.

Want to use this script on a chart?