[英]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.