Madrid

Madrid MA Ribbon Bar

This is the MMAR companion study. This along with the MMAR study help visualize in a concise way the trend direction, patterns, trend strength, entry points and reversals.
Trading with MMAR: Look for the size of the bar, when it is partially filled with a color starting from bottom to top it means there is a reentry point, but if it fills 50% or more then there is a strong possibility that this will turn into a trend reversal. You may want to wait for confirmation. Normally after two or three solid bars you can have an idea of where the trend goes.

The standard colors are
1. Red : Downtrend
2. Maroon : Short reentry or uptrend warning
3. Lime : Uptrend
4. Green : Long reentry or downtrend warning

This indicator is based on the MMAR, so the only parameter it needs is the kind of MA you want to use, if you're using a regular standard moving average or an exponential moving average (this reduces lagging). Normally I use the exponential MA, which is the default value. It is simple, it only has four output values, it can be easily interpreted and practically no input parameters to tune. This doesn't require too much space on the screen
I suggest you to shrink the bar so it gives the visual effect of a solid bar and put it at the bottom of the screen.
Remove from Favorite Scripts Add to Favorite Scripts
//
// Madrid : 26/Feb/2015 21:41: Moving Average Ribbon Bar: 1.0
// MMARB
// http://madridjourneyonws.blogspot.com/
//
// This is based on the Madrid Moving Average Ribbon study, 
// it displays the output in a bar format to better identify
// entry points, up/down trends and reversals
//

study(title="Madrid MA Ribbon Bar", shorttitle="MMARB", precision=0)

exponential = input(true, title="Exponential MA")
src = close

ma05 = exponential ? ema(src, 05) : sma(src, 05)
ma10 = exponential ? ema(src, 10) : sma(src, 10)
ma15 = exponential ? ema(src, 15) : sma(src, 15)
ma20 = exponential ? ema(src, 20) : sma(src, 20)
ma25 = exponential ? ema(src, 25) : sma(src, 25)
ma30 = exponential ? ema(src, 30) : sma(src, 30)
ma35 = exponential ? ema(src, 35) : sma(src, 35)
ma40 = exponential ? ema(src, 40) : sma(src, 40)
ma45 = exponential ? ema(src, 45) : sma(src, 45)
ma50 = exponential ? ema(src, 50) : sma(src, 50)
ma55 = exponential ? ema(src, 55) : sma(src, 55)
ma60 = exponential ? ema(src, 60) : sma(src, 60)
ma65 = exponential ? ema(src, 65) : sma(src, 65)
ma70 = exponential ? ema(src, 70) : sma(src, 70)
ma75 = exponential ? ema(src, 75) : sma(src, 75)
ma80 = exponential ? ema(src, 80) : sma(src, 80)
ma85 = exponential ? ema(src, 85) : sma(src, 85)
ma90 = exponential ? ema(src, 90) : sma(src, 90)
ma95 = exponential ? ema(src, 95) : sma(src, 95)
ma100 = exponential ? ema(src, 100) : sma(src, 100)

leadMAColor = change(ma05)>=0 and ma05>ma100 ? lime
            : change(ma05)<0  and ma05>ma100 ? maroon
            : change(ma05)<=0 and ma05<ma100 ? red
            : change(ma05)>=0 and ma05<ma100 ? green
            : gray
maColor(ma, maRef) => 
              change(ma)>=0 and ma05>maRef ? lime
            : change(ma)<0  and ma05>maRef ? maroon
            : change(ma)<=0 and ma05<maRef ? red
            : change(ma)>=0 and ma05<maRef ? green
            : gray


plot( 5, color=leadMAColor, style=line, title="MMA05", linewidth=2)
plot( 10, color=maColor(ma10,ma100), style=line, title="MMA10", linewidth=2)
plot( 15, color=maColor(ma15,ma100), style=line, title="MMA15", linewidth=2)
plot( 20, color=maColor(ma20,ma100), style=line, title="MMA20", linewidth=2)
plot( 25, color=maColor(ma25,ma100), style=line, title="MMA25", linewidth=2)
plot( 30, color=maColor(ma30,ma100), style=line, title="MMA30", linewidth=2)
plot( 35, color=maColor(ma35,ma100), style=line, title="MMA35", linewidth=2)
plot( 40, color=maColor(ma40,ma100), style=line, title="MMA40", linewidth=2)
plot( 45, color=maColor(ma45,ma100), style=line, title="MMA45", linewidth=2)
plot( 50, color=maColor(ma50,ma100), style=line, title="MMA50", linewidth=2)
plot( 55, color=maColor(ma55,ma100), style=line, title="MMA55", linewidth=2)
plot( 60, color=maColor(ma60,ma100), style=line, title="MMA60", linewidth=2)
plot( 65, color=maColor(ma65,ma100), style=line, title="MMA65", linewidth=2)
plot( 70, color=maColor(ma70,ma100), style=line, title="MMA70", linewidth=2)
plot( 75, color=maColor(ma75,ma100), style=line, title="MMA75", linewidth=2)
plot( 80, color=maColor(ma80,ma100), style=line, title="MMA80", linewidth=2)
plot( 85, color=maColor(ma85,ma100), style=line, title="MMA85", linewidth=2)
plot( 90, color=maColor(ma90,ma100), style=line, title="MMA90", linewidth=2)

hline(50, color=black, linewidth=1)
hline(25, color=red, linewidth=1)
hline(75, color=lime, linewidth=1)
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out