slow = input.int(24,"慢线")
src = input.source(close,"源值")
signalLength = input.int(9,"信号线长度")
fastEMA = ta.ema(src, fast) //计算快线
slowEMA =ta.ema(src,slow) //计算慢线
macd =fastEMA - slowEMA //计算macd的值
signal =ta.ema(macd,9) // 计算signal的值
hist =macd-signal //计算hist的值
plot(macd,color=color.yellow,linewidth=2) //macd线
plot(signal,color=color.fuchsia, linewidth = 2) //信号线
plot(hist*2,color=color.blue, style =plot.style_columns) //柱状图
hline(0,color =color.white, linewidth =1,linestyle = hline.style_dashed) //0轴水平线