53 0 1
//
// @author Kruegger
//
// based on RSI/MFI with Bollinger Bands . Dynamic Oversold/Overbought levels, yayy! by @author LazyBear
//
study(title = "RSI/Stoch %B Bolly bands by based on ", shorttitle="%B( RSI , Stoch )_%D ")
source = close
length_rsi = input(14, minval=1, title="RSI Length")
length_stoch = input(14, minval=1, title="Stoch Length")
lengthMA = input(14, minval=1, title="MA Length")
lengthD = input(3, minval=1, title="%D Length")
signal = input(3, minval=1, title="Signal smooth")

mult = input(2.0, minval=0.001, maxval=3, title="StDev Mult")
DrawRSI=input(true, title="Draw %B( RSI ) ?", type=bool)
DrawStoch=input(false, title="Draw %B( Stoch ) ?", type=bool)

// rsi
rsi = sma ( rsi (source, length_rsi),lengthD)
basis_rsi = sma ( rsi , lengthMA)
dev_rsi = mult * stdev( rsi , length_rsi)
upper_rsi = basis_rsi + dev_rsi
lower_rsi = basis_rsi - dev_rsi
rsi_b = (rsi-lower_rsi) / (upper_rsi-lower_rsi)

// stoch
stoch = sma ( stoch (source, high, low, length_stoch),lengthD)
basis_stoch = sma ( stoch , lengthMA)
dev_stoch = mult * stdev( stoch , length_stoch)
upper_stoch = basis_stoch + dev_stoch
lower_stoch = basis_stoch - dev_stoch
stoch_b = (stoch-lower_stoch) / (upper_stoch-lower_stoch)

// plot %b ( RSI , Stoch )
plot(DrawRSI ? rsi_b:na, color=blue, linewidth=1, title="%B( RSI )")
plot(DrawStoch ? stoch_b:na, color=yellow, linewidth=1, title="%B( Stoch )")
//plot(DrawRSI ? rsi_b:na, color= (rsi_b > 0 and rsi_b 0 and rsi_b = rsi_b, color=red, style=shape.triangledown, text="Sell", location=location.top)
Remove from Favorite Scripts Add to Favorite Scripts
//
// @author LazyBear
//
// If you use this code in its original/modified form, do drop me a note. 
//
study("Volume Weighted MACD [LazyBear]", shorttitle="VWMACD_LB")
slow = input(12, "Short period")
fast = input(26, "Long period")
signal = input(9, "Smoothing period")


maFast = ema( volume * close, fast ) / ema( volume, fast ) 
maSlow = ema( volume * close, slow ) / ema( volume, slow ) 
d = maSlow - maFast 
maSignal = ema( d, signal ) 
dm=d-maSignal

h_color=dm>=0? (dm>dm[1]?green:orange) : (dm<dm[1]?red:orange)
plot( dm, style=histogram, color=h_color, linewidth=3)


//
// Easter Egg! Have fun :)
//
// d_color=d>=0? (d>d[1]?green:orange) : (d<d[1]?red:orange)
// zl=plot(0, color=gray)
// dl=plot(d, style=line, color=d_color, linewidth=4)
// fill(zl, dl, silver)
United States
United Kingdom
India
Deutschland
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out