Returns the second parameter value if the first parameter value is true. Returns the third parameter value if the first parameter value is false. This function is analogous to the Microsoft Excel IF function.
Syntax: |
---|
value = IfThenElse( condition, trueValue, falseValue ) |
Parameter: |
Description: |
---|---|
condition |
Condition, or statement that evaluates to TRUE or FALSE |
trueValue |
Value returned if condition is TRUE |
falseValue |
Value returned if condition is FALSE |
Example: |
---|
' This function is useful in calculated indicators, instrument.close[1], instrument.low ) |
Returns: |
True-Value, if condition is TRUE, otherwise False-Value. |
Links: |
---|
|
See Also: |
Edit Time: 9/18/2020 12:20:13 PM |
Topic ID#: 377 |