OPEN-SOURCE SCRIPT
Aggiornato Delta Zones Buy/Sell Pressure

Script Description:
Delta Zones Buy/Sell Pressure Indicator
Description:
The "Delta Zones Buy/Sell Pressure" indicator, created by the original author "scarf", is a technical tool that unveils key areas of buying and selling pressure in the market. This indicator utilizes the concept of Delta, calculating differences between open, close, high, and low prices. When these differences exceed a threshold determined by the user-defined standard deviation, areas of intense buying (indicated by green boxes) and selling pressure (indicated by red boxes) on the chart are identified.
How It Works:
The indicator calculates Delta using various combinations of candle prices to determine buying and selling pressure. When Delta surpasses a certain level, indicated by the user-defined standard deviation, visual signals in the form of boxes on the chart are generated. These boxes highlight specific areas where buying or selling pressure is particularly strong, aiding traders in identifying potential entry and exit points in the market.
How to Use:
* When a green box is drawn, it indicates strong buying pressure in the market. This can be interpreted as a signal to consider long positions.
* When a red box is drawn, it indicates strong selling pressure in the market. This can be interpreted as a signal to consider short positions.
* Use these signals in combination with your own analysis and risk management strategies to make informed trading decisions.
Originality:
What makes this indicator original is its unique approach to identifying specific areas of buying and selling pressure. By calculating Delta in multiple ways and utilizing standard deviation as a filter, this indicator provides clear and concise visual signals about market activity. The combination of these features distinguishes it as a valuable tool for traders seeking a better understanding of market behavior. This modification differs from the original by displaying the information on the price chart with horizontal bars, below each delta, instead of an oscillator at the bottom similar to the volume indicator.
Final Recommendations:
Consider Market Trends:
Before making any trading decisions using the Delta Zones Buy/Sell Pressure Indicator, it is crucial to analyze the prevailing market trends. Assess the overall direction of the market, whether it's trending upward, downward, or moving sideways. Align your trades with the dominant trend to increase the probability of successful outcomes. The indicator's signals can be more reliable when they align with the broader market trend.
Evaluate Macro-Economic Factors:
Additionally, take into account macro-economic factors that could influence price movements. Factors such as economic indicators, geopolitical events, interest rate decisions, and global market sentiments can significantly impact the financial markets. Stay updated with relevant news and economic reports to anticipate potential market shifts. Understanding the broader economic context can help you interpret the indicator's signals within a more informed framework.
Practice Risk Management:
Regardless of the signals provided by the Delta Zones Buy/Sell Pressure Indicator, always implement effective risk management strategies. This includes setting stop-loss orders, diversifying your portfolio, and only risking a small percentage of your trading capital on each trade. By managing your risk, you can protect your investments and ensure longevity in the market, even during volatile periods.
Continuous Learning and Adaptation:
Financial markets are dynamic and constantly evolving. Continuously educate yourself about new trading strategies, technical analysis tools, and economic developments. Stay open to adapting your trading approach based on changing market conditions. Regularly reviewing your trading strategy and adjusting it according to your experiences and market feedback can significantly enhance your trading performance over the long term.
Seek Professional Advice if Necessary:
If you are uncertain about specific market trends, indicators, or economic factors, don't hesitate to seek guidance from financial advisors or professionals. Their expertise can provide valuable insights and help you make well-informed decisions, especially in complex or uncertain market environments.
By incorporating these recommendations into your trading approach, you can enhance your decision-making process, mitigate risks, and increase your overall chances of successful trading outcomes. Remember, the key to successful trading lies not only in the tools you use but also in your ability to interpret them within the broader market context.
Delta Zones Buy/Sell Pressure Indicator
Description:
The "Delta Zones Buy/Sell Pressure" indicator, created by the original author "scarf", is a technical tool that unveils key areas of buying and selling pressure in the market. This indicator utilizes the concept of Delta, calculating differences between open, close, high, and low prices. When these differences exceed a threshold determined by the user-defined standard deviation, areas of intense buying (indicated by green boxes) and selling pressure (indicated by red boxes) on the chart are identified.
How It Works:
The indicator calculates Delta using various combinations of candle prices to determine buying and selling pressure. When Delta surpasses a certain level, indicated by the user-defined standard deviation, visual signals in the form of boxes on the chart are generated. These boxes highlight specific areas where buying or selling pressure is particularly strong, aiding traders in identifying potential entry and exit points in the market.
How to Use:
* When a green box is drawn, it indicates strong buying pressure in the market. This can be interpreted as a signal to consider long positions.
* When a red box is drawn, it indicates strong selling pressure in the market. This can be interpreted as a signal to consider short positions.
* Use these signals in combination with your own analysis and risk management strategies to make informed trading decisions.
Originality:
What makes this indicator original is its unique approach to identifying specific areas of buying and selling pressure. By calculating Delta in multiple ways and utilizing standard deviation as a filter, this indicator provides clear and concise visual signals about market activity. The combination of these features distinguishes it as a valuable tool for traders seeking a better understanding of market behavior. This modification differs from the original by displaying the information on the price chart with horizontal bars, below each delta, instead of an oscillator at the bottom similar to the volume indicator.
Final Recommendations:
Consider Market Trends:
Before making any trading decisions using the Delta Zones Buy/Sell Pressure Indicator, it is crucial to analyze the prevailing market trends. Assess the overall direction of the market, whether it's trending upward, downward, or moving sideways. Align your trades with the dominant trend to increase the probability of successful outcomes. The indicator's signals can be more reliable when they align with the broader market trend.
Evaluate Macro-Economic Factors:
Additionally, take into account macro-economic factors that could influence price movements. Factors such as economic indicators, geopolitical events, interest rate decisions, and global market sentiments can significantly impact the financial markets. Stay updated with relevant news and economic reports to anticipate potential market shifts. Understanding the broader economic context can help you interpret the indicator's signals within a more informed framework.
Practice Risk Management:
Regardless of the signals provided by the Delta Zones Buy/Sell Pressure Indicator, always implement effective risk management strategies. This includes setting stop-loss orders, diversifying your portfolio, and only risking a small percentage of your trading capital on each trade. By managing your risk, you can protect your investments and ensure longevity in the market, even during volatile periods.
Continuous Learning and Adaptation:
Financial markets are dynamic and constantly evolving. Continuously educate yourself about new trading strategies, technical analysis tools, and economic developments. Stay open to adapting your trading approach based on changing market conditions. Regularly reviewing your trading strategy and adjusting it according to your experiences and market feedback can significantly enhance your trading performance over the long term.
Seek Professional Advice if Necessary:
If you are uncertain about specific market trends, indicators, or economic factors, don't hesitate to seek guidance from financial advisors or professionals. Their expertise can provide valuable insights and help you make well-informed decisions, especially in complex or uncertain market environments.
By incorporating these recommendations into your trading approach, you can enhance your decision-making process, mitigate risks, and increase your overall chances of successful trading outcomes. Remember, the key to successful trading lies not only in the tools you use but also in your ability to interpret them within the broader market context.
Note di rilascio
Detailed Improvements:1. Default Standard Deviation to 3.5 to to filter out noise.
2. User Customization: Introduced inputs for box colors and visibility, providing users with greater control over the script's appearance.
3. Encapsulation and Reusability: Encapsulated the delta calculation logic in a function for reusability and clarity.
4. Conditional Logic: Improved conditional logic for drawing and updating boxes, ensuring they are only created or adjusted when necessary.
5. Code Clarity and Maintainability: Enhanced the readability and maintainability of the code by using clear variable names and separating different parts of the logic.
Multi-Timeframe Analysis is incoming. Thanks for support!
Note di rilascio
Added alerts for new buy or sell delta pressure or absorption detection.Note di rilascio
How to Use optional ZigZag Lines with BoxesZigZag lines are like a tool to spot where price changes direction. When you turn on "Price Action Lines," these lines show up on your chart.
How Boxes and ZigZag Work Together:
-
Spotting Trends: ZigZag lines make it easier to see when the market is going up or down. When they point up, and you see green buy boxes, it confirms that there’s strong buy pressure.
-
Finding Important Levels: ZigZag lines also show important price levels, like support and resistance. If they match with big pressure boxes, you know that level really matters.
-
Better Analysis: Use both together for a clearer picture. The boxes tell you how strong the buying or selling is at each level, while ZigZag shows the overall trend.
-
Alerts: Combine buy/sell alerts with ZigZag lines for smarter signals. You’ll know when pressure is building, and the trend is changing.
In Short: The ZigZag lines show where the price is changing direction, and the boxes show where there’s strong buying or selling. Together, they help you see the bigger picture of what’s happening in the market.
Good profits!
Note di rilascio
New changes:Customizable Border Color and Thickness: Added new input parameters buyBoxBorderColor, sellBoxBorderColor, and boxBorderWidth to allow users to customize the color and thickness of the border for both Buy and Sell Pressure boxes. This provides greater flexibility in visualizing the trading zones on the chart.
Updated Box Drawing Logic: The box.new function for both Buy and Sell Pressure boxes was modified to incorporate the new border color and thickness inputs. The boxes now use the specified colors for the borders and apply the defined thickness, enhancing visual clarity.
Simplified Input Management: The new inputs were seamlessly integrated with the existing input groups, allowing traders to easily configure the appearance of the boxes through the input panel in the script settings.
These changes offer an improved level of customization, enabling users to better distinguish and emphasize the Buy and Sell zones on their trading charts.
Thanks to romanowsky for the feedback.
Note di rilascio
🚀 Delta Zones Buy/Sell Pressure —> Update v6⚠️ Please read carefully before using the new version. This is a significant update with new features that work differently depending on how you configure them. Taking 2 minutes to read through the changes will make a big difference in how much you get out of it.
═══════════════════════════════════
✅ What's new at a glance
═══════════════════════════════════
- 📊 HTF Boxes ▶ overlay delta zones from higher timeframes on your current chart
- 🧹 Auto-delete zones ▶ when price breaks through them
- 🔢 Max Boxes control ▶ decide how many zones stay visible at once
- 🗂️ Fully reorganized settings menu ▶ numbered, grouped, easy to navigate
- 🔧 Rebuilt in Pine Script v6 from scratch
═══════════════════════════════════
⚙️ What changed under the hood
═══════════════════════════════════
The original script used a single box variable for buy and a single one for sell, meaning only the most recent zone stayed active. TradingView's garbage collection then silently deleted older ones. The new version manages all boxes through arrays, giving you full control over how many are shown and when they disappear.
═══════════════════════════════════
📋 Settings breakdown
═══════════════════════════════════
1. Delta Zones ▶ General
Same as before. Standard Deviation and Lookback control how sensitive the indicator is when detecting buy/sell pressure outliers. No change here.
2. Delta Zones ▶ Current TF Boxes
- Show Buy / Sell Boxes ▶ same as before, toggles visibility.
- Max Boxes Visible ▶ new, default 3. Controls how many current TF boxes stay on screen at once. Lower = see further back in history.
- Delete Box When Price Breaks Zone ▶ new, off by default. When enabled, a buy box disappears if price closes below it, and a sell box disappears if price closes above it. Keeps the chart clean automatically.
3. HTF Boxes ▶ Activation ⭐ Main new feature
- Enable HTF Boxes ▶ off by default. Turn this on to overlay delta zones from a higher timeframe directly on your current chart. Perfect for trading 5m entries with 15m or 1H confluence.
- Higher Timeframe ▶ select which TF to pull zones from. Must be strictly higher than the chart you're on ▶ the indicator ignores invalid selections silently.
- Hide Current TF Boxes When HTF Active ▶ on by default when HTF is enabled. Hides the current TF boxes so only the HTF zones are visible, reducing clutter. Turn it off if you want to see both at the same time.
- 📌 Note ▶ even with current TF boxes hidden, the pressure arrows will still appear on every candle. Zones hidden, signals visible.
4. HTF Boxes ▶ Appearance
Colors, border style, labels and max visible boxes for the HTF zones specifically. HTF boxes are visually distinct by design ▶ thin fill, thick solid border ▶ so you can instantly tell them apart from current TF zones.
5. ZigZag ▶ Price Action
No functional changes. Just reorganized into its own clean group.
═══════════════════════════════════
💡 Why this matters
═══════════════════════════════════
The old version could only show the last ~50 boxes before TradingView's limit kicked in. Now, by setting Max Boxes to a small number (1–3), those slots are spread across a much longer history. And with HTF Boxes enabled, zones that form on the 15m or 1H appear far less frequently ▶ meaning you can see structure from days or even weeks back, directly on your lower timeframe chart.
═══════════════════════════════════
Finally ▶ thank you to everyone who's been using this indicator and sharing feedback. Questions like "why can't I see older zones?" are exactly what push these improvements forward. Keep them coming, this indicator exists because of this community. 🙏
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.