[英]Need Help for creating a Braid Filter alert by changing Color (pine Script)
你能帮我用 Pine Script 吗? Braid Filter 指示器正在绘制 3 colors。
我需要一个警报:
那是我的 plot:BraidColor = ma01 > ma02 and dif > filter? color.green: ma02 > ma01 and dif > filter? 颜色.red: 颜色.gray
谢谢帮助。
我尝试了一些来自“https://stackoverflow.com/questions/71015467/how-to-create-alert-when-indicator-color-changes-pine-script”的警报
但效果不佳。
谢谢。
为了使代码更清晰,将 colors 分开
bGreen = (ma01 > ma02 and dif > filter)
bRed = (ma02 > ma01 and dif > filter)
bGray = not bGreen and not bRed
现在您可以在警报中创建更清晰的规则
alertcondition((not bGreen[1] and bRed), "Green to Red", "Green to Red")
alertcondition((not bRed[1] and bGreen), "Red to Green", "Red to Green")
alertcondition((not bGray[1] and bRed), "Gray to Red", "Gray to Red")
alertcondition((not bGray[1] and bGreen), "Gray to Green", "Gray to Green")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.