LazyBear

Indicator: MFI or RSI enclosed by Bollinger Bands

Indicator allows choosing either MFI or RSI and draws a BB over it to identify oversold / overbought conditions.

Oversold/Overbought breaches are highlighted using different colors for easy identification. Has helped me a lot during sudden pumps to identify the tops, hope you find a use for this.
Supprimer des scripts favoris Ajouter aux scripts favoris
//
// @author LazyBear
// RSI/MFI with Bollinger Bands. Dynamic Oversold/Overbought levels, yayy!
// 
study(title = "RSI/MFI with Volatility Bands [LazyBear]", shorttitle="SI+Bands [LB]")
source = hlc3
length = input(14, minval=1), mult = input(2.0, minval=0.001, maxval=50)
DrawRSI_f=input(false, title="Draw RSI?", type=bool)
DrawMFI_f=input(true, title="Draw MFI?", type=bool)
HighlightBreaches=input(true, title="Highlight Oversold/Overbought?", type=bool)

DrawMFI = (not DrawMFI_f) and (not DrawRSI_f) ? true : DrawMFI_f
DrawRSI = (DrawMFI_f and DrawRSI_f) ? false : DrawRSI_f
// RSI
rsi_s = DrawRSI ? rsi(source, length) : na
plot(DrawRSI ? rsi_s : na, color=maroon, linewidth=2)

// MFI
upper_s = DrawMFI ? sum(volume * (change(source) <= 0 ? 0 : source), length) : na
lower_s = DrawMFI ? sum(volume * (change(source) >= 0 ? 0 : source), length) : na
mf = DrawMFI ? rsi(upper_s, lower_s) : na
plot(DrawMFI ? mf : na, color=green, linewidth=2)


// Draw BB on indices
bb_s = DrawRSI ? rsi_s : DrawMFI ? mf : na
basis = sma(bb_s, length)
dev = mult * stdev(bb_s, length)
upper = basis + dev
lower = basis - dev
plot(basis, color=red)
p1 = plot(upper, color=blue)
p2 = plot(lower, color=blue)
fill(p1,p2, blue)

b_color = (bb_s > upper) ? red : (bb_s < lower) ? green : na
bgcolor(HighlightBreaches ? b_color : na)
List of my free indicators: http://bit.ly/1LQaPK8
List of my indicators at Appstore: http://blog.tradingview.com/?p=970

Commentaires

What do the green and red vertical bands indicate?
+16 Répondre
lostkauze ParthibanRajendran
@ParthibanRajendran, whether the indicator exceeded the Bollinger Bands limits from above or from below.
+2 Répondre
Hey LB, this is great how do we use this one? Do we go long when the green line crosses over the red middle line (and vice versa for short)?
+4 Répondre
I request TRIX RB +bands
+1 Répondre
LazyBear QuantitativeExhaustion
Sure, will post.
+1 Répondre
LazyBear LazyBear
Here you go : http://pastebin.com/vmZNtyua

Sample:
+3 Répondre
Nice.. never seen this done before.
+2 Répondre
ChartArt QuantitativeExhaustion
Your "TRIX RB +bands" request turned into this?

"Trix Ribbon "
Répondre
LazyBear ChartArt
Nope. That indicator you link points to, is a ribbon..in the sense, multiple lengths are rendered together. Something like GMMA_LB or Hurst MMA_LB.
Répondre
Accueil Screener d'actions Screener Forex Screener Crypto Calendrier économique Comment ça marche Caractéristiques du graphique Prix Parrainer un ami Règles de conduite Centre d'aide Solutions site web & courtier Widgets Solutions de cartographie Bibliothèque de graphiques allégés Blog & News Twitter
Profil Paramètres du Profil Compte et Facturation Amis référés Coins Mes tickets au support Centre d'aide Idées Publiées Followers Suivi(e) Messages privés Chat Se Déconnecter