OPEN-SOURCE SCRIPT
Flops - Orderblocks

Description
The Advanced Flops - Orderblock indicator is a sophisticated, algorithmic supply and demand tracking system. It dynamically identifies trend-following institutional structures by detecting "Flops" (often known as Orderblocks) in real-time, visualizing exact areas where momentum aggressively shifted.
Instead of relying on a rigid, single-candle definition, this engine operates on a multi-timeframe perspective natively. It simultaneously evaluates 1-Candle, 2-Candle, and 3-Candle breakout logic on every single bar to validate structural breaks and paint flawless institutional supply/demand zones on your chart.
🎯 How It Works: The 1, 2, 3 Logic
The engine evaluates the market looking for a sequence of momentum candles that break structure against the previous opposing candle. By running the 1, 2, and 3-candle logic simultaneously, the script guarantees it catches both immediate V-shape reversals (1-candle) and slower, grinding structural breaks (3-candle) without drawing overlapping or duplicated zones.
Bullish ( Flops - Orderblock ): Formed when the price forcefully breaks the high of the last bearish candle. This indicates newly created demand.
Bearish ( Flops - Orderblock ): Formed when the price forcefully breaks the low of the last bullish candle. This indicates newly created supply.
✨ Key Features
Simultaneous Multi-Candle Logic: Runs three independent sequence checkers at the exact same time to ensure no valid Orderblock is ever missed.
Dynamic Mitigation Engine: Active zones project forward indefinitely into future price action until they are touched or closed through (customizable).
Single Mitigated Memory: A sleek visual feature that automatically deletes old, invalidated zones. It keeps only the absolute last mitigated zone on your chart to show you the most recent point of failure, without cluttering your screen with historical noise.
Trend Deactivation: The script understands market structure. If the dominant trend fully flips (e.g., from Bullish to Bearish based on a 3-candle sequence), all opposing active ( Flops - Orderblock ) zones are immediately deactivated and labeled as "Trend Flip", preventing you from taking trades against a confirmed structural shift.
Boundary Customization: Choose exactly how you want your Orderblock zones measured—either wick-to-wick (High/Low) or body-to-body (Open/Close).
⚙️ Settings
Flop Boundary: Define zones using full Wicks or strictly Candle Bodies.
Mitigation Mode: Choose whether a zone is invalidated the moment a wick "Touches" it, or only when a candle "Closes" fully through the zone.
Show Only Last Mitigated Flop: Keep your charts clean by automatically erasing old mitigated lines and only leaving the single most recent mitigated Orderblock on the chart.
Deactivate on Trend Flip: Automatically invalidate all active supply zones if the macro trend shifts bullish (and vice versa).
Full Visual Control: Customize colors, line widths, line styles (solid, dashed, dotted), and label visibility to fit your exact chart aesthetic.
The Advanced Flops - Orderblock indicator is a sophisticated, algorithmic supply and demand tracking system. It dynamically identifies trend-following institutional structures by detecting "Flops" (often known as Orderblocks) in real-time, visualizing exact areas where momentum aggressively shifted.
Instead of relying on a rigid, single-candle definition, this engine operates on a multi-timeframe perspective natively. It simultaneously evaluates 1-Candle, 2-Candle, and 3-Candle breakout logic on every single bar to validate structural breaks and paint flawless institutional supply/demand zones on your chart.
🎯 How It Works: The 1, 2, 3 Logic
The engine evaluates the market looking for a sequence of momentum candles that break structure against the previous opposing candle. By running the 1, 2, and 3-candle logic simultaneously, the script guarantees it catches both immediate V-shape reversals (1-candle) and slower, grinding structural breaks (3-candle) without drawing overlapping or duplicated zones.
Bullish ( Flops - Orderblock ): Formed when the price forcefully breaks the high of the last bearish candle. This indicates newly created demand.
Bearish ( Flops - Orderblock ): Formed when the price forcefully breaks the low of the last bullish candle. This indicates newly created supply.
✨ Key Features
Simultaneous Multi-Candle Logic: Runs three independent sequence checkers at the exact same time to ensure no valid Orderblock is ever missed.
Dynamic Mitigation Engine: Active zones project forward indefinitely into future price action until they are touched or closed through (customizable).
Single Mitigated Memory: A sleek visual feature that automatically deletes old, invalidated zones. It keeps only the absolute last mitigated zone on your chart to show you the most recent point of failure, without cluttering your screen with historical noise.
Trend Deactivation: The script understands market structure. If the dominant trend fully flips (e.g., from Bullish to Bearish based on a 3-candle sequence), all opposing active ( Flops - Orderblock ) zones are immediately deactivated and labeled as "Trend Flip", preventing you from taking trades against a confirmed structural shift.
Boundary Customization: Choose exactly how you want your Orderblock zones measured—either wick-to-wick (High/Low) or body-to-body (Open/Close).
⚙️ Settings
Flop Boundary: Define zones using full Wicks or strictly Candle Bodies.
Mitigation Mode: Choose whether a zone is invalidated the moment a wick "Touches" it, or only when a candle "Closes" fully through the zone.
Show Only Last Mitigated Flop: Keep your charts clean by automatically erasing old mitigated lines and only leaving the single most recent mitigated Orderblock on the chart.
Deactivate on Trend Flip: Automatically invalidate all active supply zones if the macro trend shifts bullish (and vice versa).
Full Visual Control: Customize colors, line widths, line styles (solid, dashed, dotted), and label visibility to fit your exact chart aesthetic.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.