OPEN-SOURCE SCRIPT
Mis à jour BOS and CHoCH

The market never moves in a straight line. It moves in waves.
It makes a High, comes down a bit (Low), then breaks the previous High to make a new High.
Similarly, It makes a Low, goes up a bit (High), then breaks the previous Low to make a new Low.
BOS (Break Of Structure) - Trend Continuation
BOS means the market is continuing its current trend. If the market is in an Uptrend and breaks the old "High" -> Bullish BOS. If the market is in a Downtrend and breaks the old "Low" -> Bearish BOS.
3. CHOCH (Change Of Character) - Trend Reversal
CHOCH means the mood of the market has changed. For the first time, the trend has shifted its nature.
Bullish to Bearish CHOCH: The market was making Higher Highs, but suddenly it broke its previous "Low". Now the market can fall.
Bearish to Bullish CHOCH: The market was falling (Lower Lows), but suddenly it broke its previous "High". Now the market can rise.
BOS: Confirms the trend (Breaking the ceiling to go higher).
CHOCH: Signals a trend change (Slipping and falling below the previous floor).
It makes a High, comes down a bit (Low), then breaks the previous High to make a new High.
Similarly, It makes a Low, goes up a bit (High), then breaks the previous Low to make a new Low.
BOS (Break Of Structure) - Trend Continuation
BOS means the market is continuing its current trend. If the market is in an Uptrend and breaks the old "High" -> Bullish BOS. If the market is in a Downtrend and breaks the old "Low" -> Bearish BOS.
3. CHOCH (Change Of Character) - Trend Reversal
CHOCH means the mood of the market has changed. For the first time, the trend has shifted its nature.
Bullish to Bearish CHOCH: The market was making Higher Highs, but suddenly it broke its previous "Low". Now the market can fall.
Bearish to Bullish CHOCH: The market was falling (Lower Lows), but suddenly it broke its previous "High". Now the market can rise.
BOS: Confirms the trend (Breaking the ceiling to go higher).
CHOCH: Signals a trend change (Slipping and falling below the previous floor).
Notes de version
What's new- Alerts added — the indicator can now notify you when a new BOS or CHoCH forms. Nothing about how signals are detected or drawn has changed.
- Two new settings under an "Alerts" group: Alert on BOS and Alert on CHoCH. Tick one, both, or neither.
- Ready-made alert options in TradingView's alert dropdown: BOS, CHoCH, BOS or CHoCH, plus direction-specific ones (Bullish BOS, Bearish BOS, Bullish CHoCH, Bearish CHoCH).
- Alert message includes details — symbol, timeframe, and the price at the break.
- No repeat spam — at most one alert per bar per event.
How to set it up
- Option A (uses the checkboxes): set your preferences in Settings → Alerts, then create an alert with condition = this indicator and choose Any alert() function call.
- Option B (ignores the checkboxes): create an alert and pick the exact event you want from the dropdown, e.g. CHoCH only.
- Tip: set the alert trigger to Once Per Bar Close if you only want confirmed signals, since a live bar can trigger before it closes.
Notes de version
Small Fix. Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Want to learn the real, bank-level trading methods based on logic, not lore. I'll teach you mathematical and 100% mechanical strategies that lets you trade like the pros. DM me here or on Telegram: @StableLogic
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Want to learn the real, bank-level trading methods based on logic, not lore. I'll teach you mathematical and 100% mechanical strategies that lets you trade like the pros. DM me here or on Telegram: @StableLogic
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.