PROTECTED SOURCE SCRIPT
The Consolidator [Pattern Foresight]

Overview
This Consolidator script uses detection logic to chart bullish and bearish consolidation markers and to chart shaded high/low price range lines (with green shading between the bottom range line and the price for bullish trends and with red shading between the top range line and the price for bearish trends). A consolidation point is telling you: “Price has gone quiet here. Expect expansion—likely a breakout—once volume returns.” Low volatility squeezes often lead to a breakout.
The Consolidator attempts to identify periods where the price is moving sideways, compressing into a tighter range, forming a base or coil, or preparing for a trend continuation or reversal.
Bullish Consolidation Markers - Bullish consolidation occurs when the price is coiling but buyers are in control. These are useful to help detect bull flags, ascending triangles, tight bases before breakouts.
Bearish Consolidation Markers - These are useful to help detect bear flags, descending triangles, distribution periods.
Why this indicator is unique
The Consolidator attempts to be a predictive pattern-recognition system, not a simple channel indicator by measuring consolidation tightness and high/low price ranges. The range lines help visualize the “coil” where price is compressing. Consolidation markers classify which side of the coil price is leaning toward: bullish pressure or bearish pressure. The script attempts to detect structural bullish patterns with breakout intelligence.
Usage
Consolidation Lookback - Controls how many bars are examined when determining the consolidation “box.” Think of it as: “How wide of a window do you want to search for a sideways range?” Shorter lookback (10–20): Tighter, more sensitive consolidations, faster signals, more false positives, and useful for scalping and day trading. Longer lookback (30–60): Larger, more stable consolidation zones, fewer false positives, and better for swing trading.
Tolerance Percent - Defines how “flat” highs/lows must be to qualify as consolidation. This is the key part of compression detection. Lower tolerance (0.3–0.6%): Only very tight ranges qualify with fewer but higher-quality consolidation zones. Higher tolerance (0.7–1.5%): wider ranges and more consolidation signals. Small changes to tolerance drastically change the number of consolidation markers (higher = more consolidation markers).
Disclaimer:
This script is for informational purposes only. Nothing contained herein should be construed as financial, investment, or trading advice. The author is not a financial advisor and is not providing personalized recommendations. All trading involves risk, including the potential loss of principal. The author makes no assurances of accuracy, performance, or future results. History may not reflect future performance. You are solely responsible for your own investment decisions and agree to use this script entirely at your own risk.
This Consolidator script uses detection logic to chart bullish and bearish consolidation markers and to chart shaded high/low price range lines (with green shading between the bottom range line and the price for bullish trends and with red shading between the top range line and the price for bearish trends). A consolidation point is telling you: “Price has gone quiet here. Expect expansion—likely a breakout—once volume returns.” Low volatility squeezes often lead to a breakout.
The Consolidator attempts to identify periods where the price is moving sideways, compressing into a tighter range, forming a base or coil, or preparing for a trend continuation or reversal.
Bullish Consolidation Markers - Bullish consolidation occurs when the price is coiling but buyers are in control. These are useful to help detect bull flags, ascending triangles, tight bases before breakouts.
Bearish Consolidation Markers - These are useful to help detect bear flags, descending triangles, distribution periods.
Why this indicator is unique
The Consolidator attempts to be a predictive pattern-recognition system, not a simple channel indicator by measuring consolidation tightness and high/low price ranges. The range lines help visualize the “coil” where price is compressing. Consolidation markers classify which side of the coil price is leaning toward: bullish pressure or bearish pressure. The script attempts to detect structural bullish patterns with breakout intelligence.
Usage
Consolidation Lookback - Controls how many bars are examined when determining the consolidation “box.” Think of it as: “How wide of a window do you want to search for a sideways range?” Shorter lookback (10–20): Tighter, more sensitive consolidations, faster signals, more false positives, and useful for scalping and day trading. Longer lookback (30–60): Larger, more stable consolidation zones, fewer false positives, and better for swing trading.
Tolerance Percent - Defines how “flat” highs/lows must be to qualify as consolidation. This is the key part of compression detection. Lower tolerance (0.3–0.6%): Only very tight ranges qualify with fewer but higher-quality consolidation zones. Higher tolerance (0.7–1.5%): wider ranges and more consolidation signals. Small changes to tolerance drastically change the number of consolidation markers (higher = more consolidation markers).
Disclaimer:
This script is for informational purposes only. Nothing contained herein should be construed as financial, investment, or trading advice. The author is not a financial advisor and is not providing personalized recommendations. All trading involves risk, including the potential loss of principal. The author makes no assurances of accuracy, performance, or future results. History may not reflect future performance. You are solely responsible for your own investment decisions and agree to use this script entirely at your own risk.
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน