(Bearish) CrossUnder
systemic:core-cuIndicatorsfunction1 crInputs
| Name | Type | Description |
|---|---|---|
| First Dataset | floatarray | The **first dataset** is the series you expect to cross *below* the second dataset. This is typically the faster-moving or more reactive data. |
| Second Dataset | floatarray | The **second dataset** serves as the reference line that the first dataset may cross below. This is typically the slower-moving or more stable data. |
Outputs
| Name | Type | Description |
|---|---|---|
| CrossUnder | booleanarray | A boolean time series where each value indicates whether a crossunder occurred at that timestamp. |
The Crossunder module detects the precise moment when one data series crosses below another—a classic bearish signal in technical analysis. This is the mirror image of the Crossover module and is essential for identifying trend reversals and exit points.
What Is a Crossunder?
A crossunder occurs when a faster-moving line drops below a slower-moving line:
graph LR
subgraph Before["Before Crossunder"]
A1["Fast Line: ABOVE"]
A2["Slow Line: BELOW"]
end
subgraph Cross["⚡ Crossunder Moment"]
B["Lines Intersect"]
end
subgraph After["After Crossunder"]
C1["Fast Line: BELOW"]
C2["Slow Line: ABOVE"]
end
Before --> Cross --> After
The module outputs True at the exact moment the first dataset crosses below the second (a bearish cross), False at every other bar where the comparison is possible, and null where it is not (see Missing Data below). For the bullish direction, use the Crossover module.
The Mathematics
The crossunder compares each bar against the last observed bar before it — call it :
Where:
- is the first dataset (typically the faster indicator) at time
- is the second dataset (typically the slower indicator) at time
- is the most recent bar before where both datasets have data
Note: This is a bearish-only signal —
Trueonly when the first dataset moves from at-or-above to below the second (standardta.crossundersemantics). An upward cross returnsFalse; use the Crossover module to detect it. On an uninterrupted daily series is simply ; across a weekend or data gap it is the last bar that actually traded (see Missing Data).
Missing Data
A missing (null) datapoint — a data gap or a closed-market slot — produces a null at the same position in the output. The signal is never faked with substitute values.
- Gaps are bridged, not broken: the cross is evaluated between the last two bars that actually have data. A Friday-close-to-Monday-open cross fires
Trueon Monday — the weekend nulls stay null, and no signal is lost. - The first bar is always null: a crossunder needs a previous bar to compare against, and the window's oldest bar has none. The same applies to the first bar with data when the series starts with a gap.
- Sporadic outage gaps: if data drops out mid-session, the cross is computed against the last bar before the gap, so a cross that happened during the gap surfaces on the first bar after it — delayed, never destroyed.
- Live execution returns exactly one datapoint — the newest — which is null when the current bar's data is missing.
The Death Cross: A Famous Crossunder
The most famous crossunder pattern in equity trading:
| Fast Line | Slow Line | Signal |
|---|---|---|
| 50-day SMA | 200-day SMA | Death Cross (Bearish) |
flowchart TD
SMA50["50-Day SMA"]
SMA200["200-Day SMA"]
CU["Crossunder Module"]
Signal{"Death Cross?"}
Sell["Bearish Signal"]
Hold["Hold Position"]
SMA50 --> CU
SMA200 --> CU
CU --> Signal
Signal -->|True| Sell
Signal -->|False| Hold
Historically, the Death Cross has preceded major bear markets. In March 2020, the S&P 500 experienced a Death Cross just as the COVID crash accelerated. However, like all technical signals, it's not infallible—the market recovered rapidly afterward.
Building a Complete Trading System
Crossunder works best when paired with Crossover for a complete entry/exit system:
flowchart TD
subgraph Data["Price Data"]
Price["Close Prices"]
end
subgraph Indicators["Moving Averages"]
EMA12["EMA(12)"]
EMA26["EMA(26)"]
end
subgraph Detection["Signal Detection"]
CO["Crossover Module"]
CU["Crossunder Module"]
end
subgraph Actions["Trading Actions"]
Buy["Enter Long"]
Sell["Exit / Short"]
end
Price --> EMA12 & EMA26
EMA12 & EMA26 --> CO & CU
CO --> Buy
CU --> Sell
Use Cases Beyond Moving Averages
1. RSI Overbought Exit
Detect when RSI crosses below the 70 overbought threshold:
| First Dataset | Second Dataset | Signal Meaning |
|---|---|---|
| RSI | Constant 70 | Exit overbought zone |
2. MACD Signal Line Cross
The MACD crossing below its signal line is a momentum sell signal:
| First Dataset | Second Dataset | Signal Meaning |
|---|---|---|
| MACD Line | Signal Line | Momentum turning bearish |
3. Price Breaking Support
Detect when price crosses below a key moving average:
| First Dataset | Second Dataset | Signal Meaning |
|---|---|---|
| Close Price | 200-day SMA | Major support broken |
Cryptocurrency Considerations
Crypto markets are particularly volatile, making crossunder signals both:
- More frequent — Higher volatility means more crossings
- More significant — Large moves can follow confirmed breakdowns
Consider using:
- Longer timeframes (4H, Daily) to filter noise
- Volume confirmation — Breakdowns with high volume are more reliable
- Multiple confirmations — Wait for 2-3 candles below the cross point
Advantages
- Clear exit signals — Unambiguous moment to close positions
- Pairs naturally with Crossover — Complete entry/exit system
- Works across all markets — Equities, crypto, forex, commodities
- Objective — No interpretation needed
Disadvantages
- Lagging indicator — Signals come after the move begins
- Whipsaws — Sideways markets generate false signals
- No magnitude — Can't distinguish small crosses from major breakdowns
Data Alignment in Systemic
When connecting inputs to the Crossunder module, Systemic automatically aligns your data:
| Scenario | First Dataset | Second Dataset | Behavior |
|---|---|---|---|
| Both from modules | BTC 1H | ETH 15m | Both upsampled to 15m frequency |
| Module + Constant | RSI output | 70 | Constant padded to match RSI length |
| Different lengths | 100 points | 150 points | Shorter dataset padded by repeating last value |
Important Considerations
- Upsampling uses forward-fill: When a 1-hour series is aligned to 15-minute data, intermediate points inherit the previous hour's value
- No interpolation: The system does not interpolate between values—this ensures crossunders are detected based on actual data points
- First output is always null: Since crossunder requires a previous bar to compare against, the first output value cannot be computed and is
null— never a fabricatedFalse
Indicator Assessment
%%{init: {"themeVariables": {"cScale0": "#4F46E5", "cScale1": "#059669"}}}%%
quadrantChart
title Crossunder Indicator Assessment
x-axis Low --> High
y-axis Low --> High
quadrant-1 High Popularity & Reliability
quadrant-2 High Reliability & Low Popularity
quadrant-3 Low Reliability & Popularity
quadrant-4 High Popularity & Low Reliability
"Traditional Markets": [0.85, 0.75]
"Cryptocurrency": [0.75, 0.60]
| Dimension | Stocks/Macro | Crypto | Explanation |
|---|---|---|---|
| Popularity | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | The Death Cross is among the most cited technical signals in financial media. Crypto traders also widely use it, though newer indicators sometimes take precedence. |
| Reliability | ⭐⭐⭐⭐ | ⭐⭐⭐ | In traditional markets, crossunders on major timeframes (daily/weekly) have historically preceded significant moves. Crypto's higher volatility leads to more false signals. |
| Complexity | ⭐ | ⭐ | One of the simplest indicators to understand and implement—just compare two values at consecutive time points. |
| Versatility | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Applicable to any two time series: prices, indicators, on-chain metrics, or custom data. Works across all timeframes and asset classes. |
| Recent Interest | ⭐⭐⭐ | ⭐⭐⭐⭐ | A classic indicator with steady interest. The 2022 crypto bear market renewed focus on bearish crossunder signals for risk management. |