BBonMACD

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

BBonMACD

Postby DanPhi74 » Tue Jan 07, 2020 4:04 pm

Hi Guys,
could you code me this I saw on Tradingview


// © Dreadblitz
//@version=4
//
study("Bollinguer sobre Macd", shorttitle = "BSM", overlay=false)

SDev = 0.0
banda_supe = 0.0
banda_inf = 0.0
rapida = input(8, "Media Rapida")
lenta = input(26, "Media Lenta")
stdv = input(0.8, "Stdv")
m_rapida = ema(close,rapida)
m_lenta = ema(close,lenta)
BBMacd = m_rapida - m_lenta
Avg = ema(BBMacd,9)
SDev := stdev(BBMacd,9)
banda_supe := Avg + stdv * SDev
banda_inf := Avg - stdv * SDev
pcol = BBMacd < banda_inf ? #FF0000 : BBMacd > banda_supe ? #008000 : color.blue
c=plot(BBMacd, title='Linea Macd BB"', color=pcol, linewidth=2, style=plot.style_line, transp=0)
a=plot(banda_supe, title='Banda Superior"', color=#00BFFF, linewidth=1, style=plot.style_line, transp=30)
b=plot(banda_inf, title='Banda Inferior"', color=#00BFFF, linewidth=1, style=plot.style_line, transp=30)
fill(a, b, color=#00BFFF)
pcol1 = BBMacd < banda_inf ? #FF0000 : na
fill(c, b, color=pcol1, transp=50)
pcol2 = BBMacd > banda_supe ? #008000 : na
fill(c, a, color=pcol2, transp=50)
//
// ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ //
// ALERTAS
// ------------------------------------------------------------------------------------------------------------------
Compra = crossover(BBMacd, banda_supe)
Venta = crossunder(BBMacd, banda_inf)
alertcondition(Compra or Venta,title="Compra/Venta",message="Compra/Venta")
alertcondition(Compra,title="Compra",message="Compra")
alertcondition(Venta,title="Venta",message="Venta")
Attachments
BBonMACD.JPG
DanPhi74
 
Posts: 63
Joined: Tue Dec 22, 2015 4:47 am

Re: BBonMACD

Postby Apprentice » Wed Jan 08, 2020 6:16 am

Your request is added to the development list.
Development reference 532.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 27248
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia



Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 6 guests