OPEN-SOURCE SCRIPT
Aggiornato Broadening Formation Structure Review Tool

This script provides an educational, checklist-based framework for studying Broadening Formations together with basic Strat-style reversal behavior and higher-timeframe direction. It is designed to show multiple structural conditions in one place so users can observe how they interact. It does not execute trades, generate signals, or provide financial advice.
What makes this script original is the integration of four components into a single logical framework:
• dynamic tracking of Broadening Formation high/low levels
• proximity evaluation relative to those levels
• classification of simple bar reversal behavior
• higher-timeframe open–close continuity checks
Instead of using these concepts as separate tools, the script combines them into a single checklist so users can see when multiple conditions occur at the same time.
Broadening Formation levels may be user-defined or automatically derived using:
• unlimited dynamic expansion
• range-limited dynamic expansion
• swing-pivot detection
• manual input mode
Users may also optionally lock levels once a structure is identified.
Proximity to BF levels can be measured in several ways, including percentage, ticks, points, dollars, ATR multiples, or expected-move multiples. The script can also detect when price takes out BF highs or lows.
The script classifies basic Strat-style price behavior, including:
• two-up / two-down moves
• outside bars
• failed 2U/2D reversals
• 2D→2U and 2U→2D reversals
A selectable higher timeframe (such as 60, 240, D, W, or M) is used to evaluate direction by comparing the higher-timeframe open and close.
The on-chart table summarizes:
• current BF High and BF Low levels
• proximity status relative to those levels
• whether BF highs or lows have been taken out
• reversal classification results
• higher-timeframe direction
• theoretical risk distance and 2R/3R projections
Optional alerts can notify when three-condition or four-condition checklist alignment occurs, based only on the logical rules visible in the script. Optional chart lines for BF levels may also be displayed.
Transparency and behavior notes
• swing pivots repaint until confirmed
• higher-timeframe direction is only final at bar close
• dynamically derived BF levels may update as price forms new extremes
This script is intended purely for market-structure study and education. It does not guarantee performance, predict outcomes, or recommend trades.
What makes this script original is the integration of four components into a single logical framework:
• dynamic tracking of Broadening Formation high/low levels
• proximity evaluation relative to those levels
• classification of simple bar reversal behavior
• higher-timeframe open–close continuity checks
Instead of using these concepts as separate tools, the script combines them into a single checklist so users can see when multiple conditions occur at the same time.
Broadening Formation levels may be user-defined or automatically derived using:
• unlimited dynamic expansion
• range-limited dynamic expansion
• swing-pivot detection
• manual input mode
Users may also optionally lock levels once a structure is identified.
Proximity to BF levels can be measured in several ways, including percentage, ticks, points, dollars, ATR multiples, or expected-move multiples. The script can also detect when price takes out BF highs or lows.
The script classifies basic Strat-style price behavior, including:
• two-up / two-down moves
• outside bars
• failed 2U/2D reversals
• 2D→2U and 2U→2D reversals
A selectable higher timeframe (such as 60, 240, D, W, or M) is used to evaluate direction by comparing the higher-timeframe open and close.
The on-chart table summarizes:
• current BF High and BF Low levels
• proximity status relative to those levels
• whether BF highs or lows have been taken out
• reversal classification results
• higher-timeframe direction
• theoretical risk distance and 2R/3R projections
Optional alerts can notify when three-condition or four-condition checklist alignment occurs, based only on the logical rules visible in the script. Optional chart lines for BF levels may also be displayed.
Transparency and behavior notes
• swing pivots repaint until confirmed
• higher-timeframe direction is only final at bar close
• dynamically derived BF levels may update as price forms new extremes
This script is intended purely for market-structure study and education. It does not guarantee performance, predict outcomes, or recommend trades.
Note di rilascio
V 2.0 are cosmetic with zero changes in math or alert logic. "Short Risk/Long Risk" now has a user-defined highlight. When a BF High or BF Low was broken, YES is identified by date and time on the table--when that happened.Note di rilascio
This version (2.1) adds an informational conditions counter and a user-defined minimum conditions threshold. The checklist now shows “Conditions Met: X of 4” for both long-bias and short-bias sections. Users can choose how many conditions (1–4) must be satisfied for a setup to be considered “ready” within the checklist.Visual feedback was improved for readability:
• subtle emphasis when the user-selected threshold is met
• green check indicator when minimum conditions are satisfied
No trading signals were added and no strategy logic was changed. This tool remains an educational checklist for reviewing market structure only.
Note di rilascio
V2.2 Strictly style enhancements to the table colors. No other changes.Note di rilascio
Version 2.3 (and I am thinking the very last update) Added optional user-selectable timestamp time zones and improved timestamp display for Broadening Formation break and extreme-price tracking. No changes were made to trading logic, alerts, or visual layout other than displaying times in the user’s chosen time zone.Note di rilascio
Version Update DescriptionTitle: Broadening Formation Structure Review Tool - Update v2.5
Technical Changes & Fixes:
Restoration of Short-Side Analytics: Fixed a UI logic error where the Short Target (2R/3R) and Risk-to-Reward data were not populating in the checklist panel. Both Long and Short scenarios now have symmetric data display.
Panel Stability Optimization: Implemented a persistent 80-row structural logic for the information table. This ensures the UI panel maintains a consistent height and prevents "flicker" or vertical shifting when switching between symbols or when specific trade conditions are met.
Enhanced Risk Visualization: Integrated a dynamic risk-comparison highlight. The script now automatically identifies and highlights the side (Long vs. Short) with the lower mathematical risk based on the current proximity to Broadening Formation levels.
Precision Level Tracking: Improved the "Last Extreme" logic to record and display the exact price and timestamp (in the user's selected timezone) for the highest and lowest prices reached since the most recent BF level breach.
Expanded Pattern Recognition: Refined the Strat-style pattern detection to include Failed 2-Up/2-Down sequences and 1-2-2 reversals, ensuring they are correctly labeled within the pattern row of the checklist.
Note to Moderators: This tool remains a manual analysis aid for studying market structure and does not generate automated signals or provide financial advice.
Note di rilascio
Version 2.6 Update--minor changes to the table placement. Now the user can place it Top Left, Top Right, Bottom Left, Bottom Right on the chart.Note di rilascio
Version 2.7 Update. Added a cell at the top of the table to indicate which higher timeframe is used in the overall analysis. No other changes were made to the code, and no others are anticipated.Note di rilascio
Version 2.5.7 Alerts were not working on the prior version. This update fixed alerts.Note di rilascio
V 2.7.7 fixed a table resizing problem.Note di rilascio
V 2.7.7 Added a timestamp in the table where ReversalUP or Down = Yes. Note di rilascio
Update: Version 3.0
Overview
Version 3.0 shifts the focus from simple level monitoring to Strat Scenerio Monitoring. The primary objective of this update was to add a multi-pattern reversal engine to help Strat traders identify entries at Broadening Formation (BF) boundaries.
Expanded Strat Reversal Engine
Previously, the tool was limited to basic failures. Version 3.0 now identifies and validates the full suite of Strat reversal sequences:
2-1-2 Reversals (The classic "Inside Bar" breakout)
3-1-2 Reversals (Broadening-to-Reversal transition)
1-2-2 Reversals
2-2 Reversals (Continuity and Reversal variants)
3 Reversals (Outside Bar Exhaustion)
Key Version 3.0 Enhancements
Invalidation Logic (Response-Failure Detection): If a detected pattern is triggered but then the "Stop" (the low/high of the reversal candle) is breached, the UI (the color of the letters) turns Aqua and the "Entry Permitted" state flips to **NO**.
Proximity Alerting Engine: Added a dedicated `alertcondition` for **BF Proximity**. Traders can now receive a "heads-up" notification when price enters a user-defined zone (Percent, ATR, or Ticks, Points, Dollars) near the BF High or Low.
Risk-Weighted Highlights: The UI now automatically highlights the side of the trade (Long or Short) that offers the mathematically smaller risk, assisting in objective trade selection.
HTF Continuity Integration: All setups are cross-referenced with Higher Timeframe (HTF) continuity (selectable: 60, 240, D, W, M) to ensure you are trading with the "Big Picture" flow.
Table Resizing: The table is fully resizable from the very largest to the tiniest dimensions offered on TradingView. The user can also tick off which sections of the table to be displayed, making it very user-customizable and mobile phone-friendly.
Change Log
1. REMOVED: Legacy code notations and "filler" data that cluttered the bottom of the checklist.
2. ADDED: Selection menu for "Required Entry Pattern," allowing traders to focus only on their preferred Strat setups.
4. ADDED: Timestamp logging for BF breaks and Reversal triggers, allowing for post-trade review.
5. FIXED: UI positioning logic to ensure the checklist remains scannable regardless of chart zoom or price action volatility.
6. ADDED: Strat reversal combos as previously mentioned.
7. ADDED: Alert features.
Note di rilascio
Version 3.1--Since my eyesight wasn't what it used to be, I made the BF lines thickness adjustable by the user.Note di rilascio
Version 4.0 gets rid of the not very useful Dynamic Unlimted and Dynamic Limited and introduces the Current BF. The chart now plots the current BF High and BF Low on the right side. New highs and lows plotted occur upon a reversal at that high or low. I am quite satisfied with this.
If anyone has another suggestion, I will consider it.
But for now, I am content.
Note di rilascio
Version 4.1 Small update. Decided to add R:R on the highlighted Long Risk or Short Risk for a quick visual reference for the user. No other changes anticipated.Note di rilascio
Version 4.3 is a minor update to Long Risk/Short Risk. If price broadens with a closed candle, if short, the Short Risk will print INVALID with the price difference. Note di rilascio
Version 4.5 introduces a compact mode that lets users choose which information is most relevant to their trading style. It also saves a lot of screen space--think smartphones.Note di rilascio
Version 4.6--Update allows the user to choose which conditions must be met to trigger Entry Permitted Cell to fire off YES / NO. No other changes to the code.Note di rilascio
Version 4.7--Quick fix to an error I found in the logic of the code which I previously missed.Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.