[英]Pine script - Enter position when multiple conditions are true or false
抱歉,我是 pine 脚本的新手。 希望你能在这方面帮助我。 我正在尝试在退出的 V4 脚本中添加多个条件,如下所示。
Condition1 = crossover(close,ema1)
Condition2 = crossunder(close,ema1)
Condition3 = crossover(rsi,50)
Condition4 = crossunder(rsi,50)
How do I make the conditions status "True" or "False" for the followings scenario?
Long = (if last cross was Condition1) and Condition3
Short = (if last cross was Condition2) and Condition4
非常感谢
就像你用自然语言写的一样。
Long = Condition1 and Condition3
稍后您可以在Long
为真时触发警报。
这与 Pine 无关,这是 Boolean 代数,您应该阅读它以更好地理解它: https://en.wikipedia.org/wiki/Boolean_algebra
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.