您好,文华WH6期货高级指标源码:
slowLength = input.int(26, title="慢速EMA周期")
signalLength = input.int(9, title="信号线周期")
// 计算MACD相关值
fastMA = ema(close, fastLength)
slowMA = ema(close, slowLength)
dif = fastMA - slowMA
dea = ema(dif, signalLength)
macd = (dif - dea) * 2
// 顶底判断
topCondition = crossunder(dif, dea) and macd > 0
bottomCondition = crossover(dif, dea) and macd < 0
// 绘制标记
plotshape(topCondition, style=shape.labeldown, location=location.belowbar, text="顶", color=color.red)
plotshape(bottomCondition, style=shape.labelup, location=location.abovebar, text="底", color=color.green)
这个指标通过MACD计算,当DIF下穿DEA且MACD大于0标记为顶,DIF上穿DEA且MACD小于0标记为底 。
期货交易,最难的就是看清方向并控制失误。这一年,我通过不断优化,实盘验证了一套完善的多空指标系统,帮助我精准识别信号,避开了过去容易犯的错误。现在,这套系统已经非常成熟,可以分享给更多和我一样在市场努力的朋友。如果你想更快找到交易方向,加我微信手把手教你安装使用,尽量让你早日掌握高效方法。
发布于2025-2-9 22:01 北京

