OPEN-SOURCE SCRIPT
Reballo Hindenburg Omen - Breadth Gate

What it is
The classic four-condition Hindenburg Omen, computed live from NYSE internals, held active for a set number of bars after it fires, plus a weekly breadth-oversold override. The output is a simple three-state risk gate:
This is not a crash predictor. The Omen's track record as a standalone signal is genuinely mixed, and anyone who tells you otherwise is selling something. What it is good at: catching the specific moment when a market is making new highs while a growing number of stocks are quietly breaking down. That's worth knowing, and worth being able to verify line by line.
The four conditions
All computed daily from NYSE data, all shown in the table so you can see which ones are holding:
When all four hit on the same day, a triangle prints and the gate turns red for 30 bars. Consecutive fires just extend the window.
The override
A weekly read of S5TH (percent of S&P 500 stocks above their 200-day MA). Below 30, the gate flips green and beats the Omen. The logic: once breadth is that washed out, the "split market" story is over and you're in a different regime where adding risk into weakness has worked far more often than not.
The table
Top right. One row per condition with the live value, green if met, red if not. When the Omen isn't active you can still see how close it is, which is most of the value.
How I use it
As a gate on position sizing, not as an entry or exit. Red = don't add. Green = the floor is probably in, don't panic-cut. It sits alongside a slow Ehlers CG and a regime score; when two or three of them agree the picture is usually right. On its own, treat it as one opinion.
Three alerts: Omen fires, Omen expires, breadth goes oversold.
Data requirements (read this)
Settings
Open source. Fork it, break it, tell me what you find.
The classic four-condition Hindenburg Omen, computed live from NYSE internals, held active for a set number of bars after it fires, plus a weekly breadth-oversold override. The output is a simple three-state risk gate:
- Red — Omen active. Internals are split and weakening under a still-rising index. Freeze new risk.
- Green — Breadth washed out. Fewer than 30% of S&P 500 stocks above their 200-day. Historically a bad time to be cutting risk.
- Nothing — Clear. Most of the time.
This is not a crash predictor. The Omen's track record as a standalone signal is genuinely mixed, and anyone who tells you otherwise is selling something. What it is good at: catching the specific moment when a market is making new highs while a growing number of stocks are quietly breaking down. That's worth knowing, and worth being able to verify line by line.
The four conditions
All computed daily from NYSE data, all shown in the table so you can see which ones are holding:
- 1. Split market: new 52-week highs AND new 52-week lows both >= 2.2% of issues traded. The core of the Omen. A healthy market doesn't do both at once.
- 2. Still in an uptrend: NYSE Composite higher than 50 bars ago. The Omen is about divergence, so it only fires while the index is still up.
- 3. Internals weakening: McClellan Oscillator below zero (19/39 EMA on ratio-adjusted net advances).
- 4. Highs not dominating: new highs / new lows < 2.
When all four hit on the same day, a triangle prints and the gate turns red for 30 bars. Consecutive fires just extend the window.
The override
A weekly read of S5TH (percent of S&P 500 stocks above their 200-day MA). Below 30, the gate flips green and beats the Omen. The logic: once breadth is that washed out, the "split market" story is over and you're in a different regime where adding risk into weakness has worked far more often than not.
The table
Top right. One row per condition with the live value, green if met, red if not. When the Omen isn't active you can still see how close it is, which is most of the value.
How I use it
As a gate on position sizing, not as an entry or exit. Red = don't add. Green = the floor is probably in, don't panic-cut. It sits alongside a slow Ehlers CG and a regime score; when two or three of them agree the picture is usually right. On its own, treat it as one opinion.
Three alerts: Omen fires, Omen expires, breadth goes oversold.
Data requirements (read this)
- Pulls USI:ADV, USI:DECL, USI:UNCH.NY, INDEX:MAHN, INDEX:MALN, NYA and S5TH. Some of these are not visible on every plan. If the table shows n/a, that's a data access issue, not a script bug.
- All inputs come from index data, so it runs on any chart symbol. Put it on SPY, BTC, whatever you trade. It's telling you about the US market either way.
- US stocks only. It has nothing to say about EFA or EEM beyond the fact that US internals tend to lead.
Settings
- New Highs AND New Lows >= — 2.2% — the split-market threshold
- Index higher than N bars ago — 50 — the uptrend check
- Highs / Lows < — 2.0 — condition 4
- Keep Omen active for N bars — 30 — the hold window
- Breadth Symbol / Oversold Below — S5TH / 30 — the override
Open source. Fork it, break it, tell me what you find.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.