That’s why we’ve brought the power of these
institutional-grade indicators to a more accessible
platform: TradingView. Now you can leverage the same
powerful tools used to manage billions, without breaking
the bank. We’re providing the full source code so you
can see exactly how it works. Here’s how to set it up
and start using it today.
https://www.tradingview.com/chart/
https://www.bloomberg.com/professional/products/bloomberg-terminal/
fastLength = input(8, minval=1)
slowLength = input(16,minval=1)
signalLength=input(11,minval=1)
hline(0, color=purple, linestyle=dashed)
fastMA = ema(close, fastLength)
slowMA = ema(close, slowLength)
macd = fastMA - slowMA
signal = sma(macd, signalLength)
pos = iff(signal < macd , 1, iff(signal > macd, -1, nz(pos[1], 0)))
barcolor(pos == -1 ? red: pos == 1 ? green : blue)
plot(signal, color=red, title="SIGNAL")
plot(macd, color=blue, title="MACD")