OPEN-SOURCE SCRIPT
Consolidation/Base

Core Functionality
Identifies Consolidation Zones: Detects periods where price moves within a defined range after significant moves
Fractal-based Detection: Uses highest/lowest points within a loopback period to identify potential consolidation boundaries
Breakout Detection: Flags when price breaks out of consolidation zones
Key Features
Input Parameters
Loopback Period (20): How many bars to look back for fractal detection
Min Consolidation Length (10): Minimum bars required to form a valid consolidation
Visual Customization: Options to show/hide consolidation areas, fractal symbols, and middle lines
Visual Elements
Consolidation Zones: Draws horizontal lines marking the upper and lower boundaries of consolidation areas
Middle Price Line: Displays the midpoint of consolidation ranges (yellow dashed line)
Price Labels: Shows exact price levels for boundaries and middle line
Fractal Breakout Symbols: Marks breakout points with symbols (when enabled)
Technical Logic
Fractal Detection: Identifies local highs/lows using ta.highestbars() and ta.lowestbars()
Direction Tracking: Maintains market direction state (1 for up, -1 for down, 0 for neutral)
Consolidation Counting: Tracks consecutive bars within consolidation boundaries
Breakout Logic: Detects when price breaks above resistance or below support
Use Cases
Range Trading: Identify consolidation zones for range-bound strategies
Breakout Trading: Spot potential breakout levels for momentum entries
Support/Resistance: Dynamic support and resistance levels based on recent price action
Market Structure: Understand current market state (ranging vs. trending)
The indicator is particularly useful for traders looking to capitalize on periods of low volatility that often precede significant price movements.
Identifies Consolidation Zones: Detects periods where price moves within a defined range after significant moves
Fractal-based Detection: Uses highest/lowest points within a loopback period to identify potential consolidation boundaries
Breakout Detection: Flags when price breaks out of consolidation zones
Key Features
Input Parameters
Loopback Period (20): How many bars to look back for fractal detection
Min Consolidation Length (10): Minimum bars required to form a valid consolidation
Visual Customization: Options to show/hide consolidation areas, fractal symbols, and middle lines
Visual Elements
Consolidation Zones: Draws horizontal lines marking the upper and lower boundaries of consolidation areas
Middle Price Line: Displays the midpoint of consolidation ranges (yellow dashed line)
Price Labels: Shows exact price levels for boundaries and middle line
Fractal Breakout Symbols: Marks breakout points with symbols (when enabled)
Technical Logic
Fractal Detection: Identifies local highs/lows using ta.highestbars() and ta.lowestbars()
Direction Tracking: Maintains market direction state (1 for up, -1 for down, 0 for neutral)
Consolidation Counting: Tracks consecutive bars within consolidation boundaries
Breakout Logic: Detects when price breaks above resistance or below support
Use Cases
Range Trading: Identify consolidation zones for range-bound strategies
Breakout Trading: Spot potential breakout levels for momentum entries
Support/Resistance: Dynamic support and resistance levels based on recent price action
Market Structure: Understand current market state (ranging vs. trending)
The indicator is particularly useful for traders looking to capitalize on periods of low volatility that often precede significant price movements.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.