OPEN-SOURCE SCRIPT
Pivot and Wick Boxes with Break Signals v2

█ OVERVIEW
The "Pivot and Wick Boxes with Break Signals v2" is an advanced Pine Script® technical analysis tool that identifies pivot points (highs and lows) on the chart and draws customizable boxes based on the wicks of pivot candles. It is ideal for traders using price action strategies, helping to identify key support and resistance levels and potential breakout trading opportunities. With flexible settings, a volume filter, and label grouping, the indicator ensures clarity and precision on the chart.
█ CONCEPTS
The indicator modifies how zones are drawn, displaying boxes on the latest candle rather than extending from the zones based on pivot candle wicks. This approach prevents visual clutter on the chart, allowing simultaneous use of other indicators without sacrificing clarity.
Why are wicks important?Wicks of pivot candles indicate significant market reactions in key areas. Depending on the context, they may signal rejection, testing, or absorption of support or resistance levels. Long wicks often appear where large players are active, and the marked zones are frequently retested. The indicator enables quick identification and observation of their impact on future price movements.
█ FEATURES
Pivot Detection: Identifies pivot points (highs and lows) based on a user-defined lookback period (Pivot Length), with options to display boxes for high and low pivot candle wicks separately.
Customizable Boxes: Draws boxes based on pivot candle wicks with adjustable border colors, background gradients, border styles (solid, dashed, dotted), and border widths.
Breakout Signals: Generates buy (green upward triangle) and sell (red downward triangle) signals when the price breaks through a pivot and the candle closes on the opposite side, indicating potential trend continuation. If the price approaches a pivot zone but fails to break it, this may suggest a potential trend reversal or the end of a correction.
Volume Filter: Optional volume-based signal filter that requires breakouts to have a volume exceeding a user-defined multiplier of the average volume over a specified period. Note: the volume filter will not work on markets where volume data is unavailable.
Label Grouping: Automatically groups overlapping pivot labels to avoid chart clutter, displaying only key price levels.
█ HOW TO USE
Add to Chart: Apply the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configure Settings:
Pivot Settings: Adjust Pivot Length to change the sensitivity of pivot detection—the value represents the number of candles, which equals the delay in displaying the pivot. Larger values generate fewer pivots, but they are generally more significant. Set Max High Pivot Boxes and Max Low Pivot Boxes to control the number of displayed boxes.
Signal Settings: Enable Use Volume Filter for Signals to require higher volume for breakouts, and adjust Average Volume Multiplier and Average Volume Period. A volume multiplier of 1 means the filter allows pivots with a volume equal to or greater than the average volume over the specified period.
Box Styling: Configure border colors, background gradients, line thickness, and border styles for high and low pivot boxes.
Interpreting Signals:
Buy Signal: A green triangle below the bar indicates a breakout above a high pivot box, suggesting potential continuation of an uptrend.
Sell Signal: A red triangle above the bar indicates a breakout below a low pivot box, suggesting potential continuation of a downtrend.
Non-Breakout Zones: If the price approaches a pivot zone but fails to break it, it may indicate a potential trend reversal or the end of a correction (e.g., price rejection at a resistance level in a downtrend or a support level in an uptrend).
Overlapping Zones: If pivot zones overlap, it indicates the level has been tested multiple times, suggesting its significance in the market.
Use signals in conjunction with other technical analysis tools for confirmation.
Monitoring Levels: Use labeled pivot levels as potential support and resistance zones for trade planning.
█ APPLICATIONS
Price Action Trading: Use pivot levels as support and resistance zones. For example, in an uptrend, you can look for buying opportunities near low pivot zones (support), where price often bounces after testing the wick of a pivot candle. Combining with other indicators, such as Fibonacci levels, enhances the significance of pivot zones—if they align with Fibonacci levels and are accompanied by high volume, the zone is considered stronger.
Breakout Strategies: Trade based on breakout signals from key pivot zones. A buy signal after a breakout from a high pivot with confirmed volume may indicate continued upward movement. Using the indicator with other tools, such as moving averages or RSI, can help confirm the strength of the breakout.
Practical Approach:
The more frequently a zone is tested in a short period, the higher the risk of a breakout, as supply or demand may be exhausted.
The longer a zone holds without breaking, the more significant it becomes for the market, both psychologically and technically.
As the saying goes: “A zone is strong until it breaks—when it does, a strong move often follows.”
How to observe?
Strong bounces from a zone indicate that demand or supply remains active.
Weaker bounces or price lingering near the level may suggest the market is preparing for a breakout.
█ NOTES
Test the indicator across different timeframes and markets (stocks, forex, crypto) to optimize settings for your trading style.
The volume filter will not work on markets where volume data is unavailable. In such cases, disable the volume filter in the settings.
For best results, use on high-liquidity markets when the volume filter is enabled.
The "Pivot and Wick Boxes with Break Signals v2" is an advanced Pine Script® technical analysis tool that identifies pivot points (highs and lows) on the chart and draws customizable boxes based on the wicks of pivot candles. It is ideal for traders using price action strategies, helping to identify key support and resistance levels and potential breakout trading opportunities. With flexible settings, a volume filter, and label grouping, the indicator ensures clarity and precision on the chart.
█ CONCEPTS
The indicator modifies how zones are drawn, displaying boxes on the latest candle rather than extending from the zones based on pivot candle wicks. This approach prevents visual clutter on the chart, allowing simultaneous use of other indicators without sacrificing clarity.
Why are wicks important?Wicks of pivot candles indicate significant market reactions in key areas. Depending on the context, they may signal rejection, testing, or absorption of support or resistance levels. Long wicks often appear where large players are active, and the marked zones are frequently retested. The indicator enables quick identification and observation of their impact on future price movements.
█ FEATURES
Pivot Detection: Identifies pivot points (highs and lows) based on a user-defined lookback period (Pivot Length), with options to display boxes for high and low pivot candle wicks separately.
Customizable Boxes: Draws boxes based on pivot candle wicks with adjustable border colors, background gradients, border styles (solid, dashed, dotted), and border widths.
Breakout Signals: Generates buy (green upward triangle) and sell (red downward triangle) signals when the price breaks through a pivot and the candle closes on the opposite side, indicating potential trend continuation. If the price approaches a pivot zone but fails to break it, this may suggest a potential trend reversal or the end of a correction.
Volume Filter: Optional volume-based signal filter that requires breakouts to have a volume exceeding a user-defined multiplier of the average volume over a specified period. Note: the volume filter will not work on markets where volume data is unavailable.
Label Grouping: Automatically groups overlapping pivot labels to avoid chart clutter, displaying only key price levels.
█ HOW TO USE
Add to Chart: Apply the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configure Settings:
Pivot Settings: Adjust Pivot Length to change the sensitivity of pivot detection—the value represents the number of candles, which equals the delay in displaying the pivot. Larger values generate fewer pivots, but they are generally more significant. Set Max High Pivot Boxes and Max Low Pivot Boxes to control the number of displayed boxes.
Signal Settings: Enable Use Volume Filter for Signals to require higher volume for breakouts, and adjust Average Volume Multiplier and Average Volume Period. A volume multiplier of 1 means the filter allows pivots with a volume equal to or greater than the average volume over the specified period.
Box Styling: Configure border colors, background gradients, line thickness, and border styles for high and low pivot boxes.
Interpreting Signals:
Buy Signal: A green triangle below the bar indicates a breakout above a high pivot box, suggesting potential continuation of an uptrend.
Sell Signal: A red triangle above the bar indicates a breakout below a low pivot box, suggesting potential continuation of a downtrend.
Non-Breakout Zones: If the price approaches a pivot zone but fails to break it, it may indicate a potential trend reversal or the end of a correction (e.g., price rejection at a resistance level in a downtrend or a support level in an uptrend).
Overlapping Zones: If pivot zones overlap, it indicates the level has been tested multiple times, suggesting its significance in the market.
Use signals in conjunction with other technical analysis tools for confirmation.
Monitoring Levels: Use labeled pivot levels as potential support and resistance zones for trade planning.
█ APPLICATIONS
Price Action Trading: Use pivot levels as support and resistance zones. For example, in an uptrend, you can look for buying opportunities near low pivot zones (support), where price often bounces after testing the wick of a pivot candle. Combining with other indicators, such as Fibonacci levels, enhances the significance of pivot zones—if they align with Fibonacci levels and are accompanied by high volume, the zone is considered stronger.
Breakout Strategies: Trade based on breakout signals from key pivot zones. A buy signal after a breakout from a high pivot with confirmed volume may indicate continued upward movement. Using the indicator with other tools, such as moving averages or RSI, can help confirm the strength of the breakout.
Practical Approach:
The more frequently a zone is tested in a short period, the higher the risk of a breakout, as supply or demand may be exhausted.
The longer a zone holds without breaking, the more significant it becomes for the market, both psychologically and technically.
As the saying goes: “A zone is strong until it breaks—when it does, a strong move often follows.”
How to observe?
Strong bounces from a zone indicate that demand or supply remains active.
Weaker bounces or price lingering near the level may suggest the market is preparing for a breakout.
█ NOTES
Test the indicator across different timeframes and markets (stocks, forex, crypto) to optimize settings for your trading style.
The volume filter will not work on markets where volume data is unavailable. In such cases, disable the volume filter in the settings.
For best results, use on high-liquidity markets when the volume filter is enabled.
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。