OPEN-SOURCE SCRIPT
BASE - Consolidation with Fractal Breakouts

How It Works
This indicator analyzes historical price data to find periods where the market is trading within a relatively tight range, which is a key characteristic of consolidation. Once a consolidation period is identified, it draws a channel showing the upper and lower price boundaries. The indicator then looks for a breakout, which is a significant price movement beyond these boundaries.
Fractal Breakouts: The script uses a fractal-based approach to confirm breakouts. A fractal is a specific price pattern that marks a high or low point in the market. The code identifies a breakout when the price breaks above a previous fractal high (an upward breakout) or below a previous fractal low (a downward breakout).
Visual Elements: The indicator provides several visual cues to help traders:
Consolidation Zone: It shades the area between the high and low of the consolidation period to make it visually distinct.
Boundary Lines: It draws dashed lines marking the high and low prices of the consolidation range.
Middle Line: An optional line is displayed at the 50% mark of the consolidation range.
Breakout Symbols: It places up (⬆) or down (⬇) arrow symbols on the chart to indicate the direction of a confirmed breakout.
Candle Colors: It can optionally color the price candles themselves to signal a breakout.
Alerts: The script is configured to trigger an alert when a breakout occurs, notifying the user.
Customization
The script offers several user-configurable settings to tailor its behavior, which are accessed through the indicator's settings menu:
Loopback Period: Controls the number of past bars the indicator looks at to identify price fractals.
Min Consolidation Length: Sets the minimum number of bars required to define a valid consolidation period.
Paint Consolidation Area: A toggle to show or hide the shaded consolidation zone.
Show Fractal Breakout Symbols: A toggle to show or hide the breakout symbols.
Show Middle Price Line: A toggle to show or hide the middle price line.
Color Candles on Breakout: A toggle to enable or disable coloring the candles during a breakout.
This tool is useful for traders who employ breakout strategies, as it automates the process of identifying potential entry and exit points after a period of market indecision.
This indicator analyzes historical price data to find periods where the market is trading within a relatively tight range, which is a key characteristic of consolidation. Once a consolidation period is identified, it draws a channel showing the upper and lower price boundaries. The indicator then looks for a breakout, which is a significant price movement beyond these boundaries.
Fractal Breakouts: The script uses a fractal-based approach to confirm breakouts. A fractal is a specific price pattern that marks a high or low point in the market. The code identifies a breakout when the price breaks above a previous fractal high (an upward breakout) or below a previous fractal low (a downward breakout).
Visual Elements: The indicator provides several visual cues to help traders:
Consolidation Zone: It shades the area between the high and low of the consolidation period to make it visually distinct.
Boundary Lines: It draws dashed lines marking the high and low prices of the consolidation range.
Middle Line: An optional line is displayed at the 50% mark of the consolidation range.
Breakout Symbols: It places up (⬆) or down (⬇) arrow symbols on the chart to indicate the direction of a confirmed breakout.
Candle Colors: It can optionally color the price candles themselves to signal a breakout.
Alerts: The script is configured to trigger an alert when a breakout occurs, notifying the user.
Customization
The script offers several user-configurable settings to tailor its behavior, which are accessed through the indicator's settings menu:
Loopback Period: Controls the number of past bars the indicator looks at to identify price fractals.
Min Consolidation Length: Sets the minimum number of bars required to define a valid consolidation period.
Paint Consolidation Area: A toggle to show or hide the shaded consolidation zone.
Show Fractal Breakout Symbols: A toggle to show or hide the breakout symbols.
Show Middle Price Line: A toggle to show or hide the middle price line.
Color Candles on Breakout: A toggle to enable or disable coloring the candles during a breakout.
This tool is useful for traders who employ breakout strategies, as it automates the process of identifying potential entry and exit points after a period of market indecision.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.