Is there an "Or, If" function?

 

Hi everyone


I know this is probably a simple question but how do I set up a few options to open or close positions? Example:

I want to open a long position if RSI crosses above 30 or if RSI crosses above 70. And then close the order if RSI crosses under 70 or crosses under 50.

Basically the question is: In addition to the "if" function how do I add an "or, if" function?

 

The "or" operator is the || "character"

if(CrossUp(RSI, 30) == true || CrossUp(RSI, 70) == true ) OpenLongPosition();

---

"if A is true or if B is true or if C is true or if D is true then print..."

if(A || B || C|| D) print...

 
phy:

The "or" operator is the || "character"

if(CrossUp(RSI, 30) == true || CrossUp(RSI, 70) == true ) OpenLongPosition();

---

"if A is true or if B is true or if C is true or if D is true then print..."

if(A || B || C|| D) print...


Reason: