The CROSSES UNDER operator in ProBuilder language is used to determine if one curve or line graphically crosses below another curve on a chart. This operator is particularly useful in technical analysis for identifying potential bearish signals when analyzing financial data.
a CROSSES UNDER b
Consider two moving averages calculated on the closing prices of a stock: a short-term exponential moving average (EMA) and a long-term EMA. The following example demonstrates how to use the CROSSES UNDER operator to generate a signal when the short-term EMA crosses under the long-term EMA:
a = ExponentialAverage[20](close)
b = ExponentialAverage[50](close)
signal = 0
IF a[1] CROSSES UNDER b[1] THEN
signal = -1
ELSE
signal = 0
ENDIF
RETURN signal AS "Bearish Signal"
This operator is essential for creating trading strategies and signals based on the relationship between different data series, particularly in the context of moving averages or other technical indicators.