and

The and function can be used in both system and designer indicator creation. It is a logical function .


System Creation:


When specifying exit conditions, only one of several specified conditions must be met to exit the position. If, for example, you have a Gann Trend Indicator stop and trailing stop loss as exit conditions, meeting either condition (the Gann Trend Indicator stop OR the trailing stop loss) will result in exiting the trade. You can change this behavior by drawing a rectangle and inserting an and function into the rectangle. Assuming you don’t have multiple rectangles, this changes conditions so that the trade cannot be exited until every condition inside the rectangle is met, so in our above example, both the Gann Trend Indicator stop and the trailing stop loss would have to be hit on the same bar for the trade to exit.


Designer Creation:


This section assumes you have read the if help section. When designing indicators, the and function is used in conjunction with multiple If functions to test the veracity of multiple conditions. An and function can only have if, then, and else functions, and it must have at least two If functions. If all of the if functions surrounding the And operator are true, the then function will be returned; otherwise, the else function will be returned.