OPEN-SOURCE SCRIPT
Güncellendi

Delta Zones Buy/Sell Pressure

172 049
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.
Sürüm Notları
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!
Sürüm Notları
Added alerts for new buy or sell delta pressure or absorption detection.
Sürüm Notları
Added buy/sell signals with arrows for clearer market direction insights.ekran görüntüsü
Sürüm Notları
Fixed some issues and added optional price action ZigZag lines. The feature is disabled by default and can be enabled by checking 'Price Action Lines' in the indicator settings.

ekran görüntüsü
Sürüm Notları
How to Use optional ZigZag Lines with Boxes

ZigZag 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!
Sürüm Notları
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.
Sürüm Notları
🚀 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 Visiblenew, default 3. Controls how many current TF boxes stay on screen at once. Lower = see further back in history.
  • Delete Box When Price Breaks Zonenew, 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 Boxesoff 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 Activeon 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. 🙏
Sürüm Notları
🚀 **Delta Zones Buy/Sell Pressure —> Update: Live ZigZag Volume Profile**

⚠️ **Please read before enabling.** This is a big addition, and it's **entirely optional**.

═══════════════════════════════════
**🆕 First, the most important thing**
═══════════════════════════════════

This update adds a **Live Volume Profile as an optional module**, for those who want to complement the indicator with volume-based analysis on top of the ZigZag. It doesn't replace or change anything about how Delta Zones already works — **the Buy/Sell pressure boxes are completely independent and will keep showing exactly as before**, whether you enable this new feature or not.

═══════════════════════════════════
**✅ What's new at a glance**
═══════════════════════════════════

- 📊 **Live Volume Profile** ▶ profiles volume inside every ZigZag impulse, live, while it's still forming
- 🎯 **ATR-based Impulse Filter** ▶ automatically separates real impulses from noise, no manual tuning per instrument or timeframe
- 🔼🔽 **Bull + Bear support** ▶ profile bullish legs, bearish legs, or both at once
- 🟧 **Value Area / POC / LVN** ▶ standard volume-profile analytics drawn directly on each impulse
- 🎨 **Auto-theme colors** ▶ readable on both light and dark chart backgrounds by default

═══════════════════════════════════
**⚙️ Why this is different from a normal Volume Profile**
═══════════════════════════════════

Most Volume Profile tools split a **fixed time window** (a session, a day, N bars) into price levels. That window is arbitrary — it has nothing to do with whether the market actually did something meaningful during it.

This version anchors the profile to **price structure instead of time**: it only profiles the exact range of a ZigZag-confirmed impulse, from its confirmed low to its confirmed high (or high-to-low for bearish legs). The edges of the profile *are* the impulse — not an arbitrary lookback.

═══════════════════════════════════
**🎯 The ATR filter — solving "how big is big enough?"**
═══════════════════════════════════

Not every ZigZag leg deserves a profile — plenty are just noise inside a larger trend. Instead of a fixed price-range threshold (which would need re-tuning for every instrument and timeframe — SPX500 Daily and EURUSD M15 share nothing in raw price terms), the filter is expressed in **ATR multiples**:

*A leg only gets profiled once its range exceeds (Minimum leg range × ATR) AND lasts at least (Minimum leg duration) bars.*

Because ATR already measures "what a normal move looks like right now, for this exact instrument and timeframe," the same multiplier (default 6× ATR) works whether you're on Gold H1, EURUSD M5, or SPX500 Daily — without touching a single setting when you switch charts. The duration filter catches what ATR alone can miss: a sharp, short-lived spike that technically clears the ATR bar but isn't a sustained impulse.

═══════════════════════════════════
**⚡ Live, not lagging**
═══════════════════════════════════

A ZigZag pivot only gets *confirmed* several bars after it actually happened (controlled by Depth). Most tools built on top of a ZigZag wait for that confirmation before doing anything — so by the time you see the profile, price has often already reacted to the very levels it's showing you.

This version starts profiling the moment the **starting** pivot confirms, and updates the histogram every single bar while the impulse is still developing — using the running high (or low) as the provisional edge of the range. When the opposite pivot eventually confirms, that live profile simply freezes as the finalized version. You see the structure while it's forming, not after the fact.

═══════════════════════════════════
**👁️ Recommended way to view it**
═══════════════════════════════════

Once you enable the ZigZag (Section 5A) together with the Volume Profile (5B), I recommend **hiding the price candles** (the eye icon next to the symbol, or right-click → Visual Order) so you can navigate purely by the main structural moves the ZigZag has filtered — each one already profiled with its own volume distribution. This keeps the chart focused on what actually matters: confirmed impulses and where volume concentrated within them, without the candle noise competing for attention.

Your **Delta Zones boxes are unaffected either way** — they're computed independently and will keep appearing normally regardless of whether you hide the candles or enable any of the ZigZag/Volume Profile options.

═══════════════════════════════════
**📋 Settings breakdown (Section 5)**
═══════════════════════════════════

**5A. ZigZag — Price Action** ▶ unchanged, the original optional lines feature.

**5B. Volume Profile** ▶ master switch (off by default), profile mode (Bullish only / Bearish only / Both), levels, Value Area %, labels, LVN threshold, auto-theme colors.

**5C / 5D. Bullish / Bearish Colors** ▶ separate, muted default palettes so both sides stay readable at once when overlapping.

**5E. Impulse Size Filter (ATR)** ▶ the auto-adapting filter described above.

═══════════════════════════════════
**💡 Why this matters for you as a trader**
═══════════════════════════════════

- No more guessing which pullback is "big enough to matter" — the ATR filter answers that objectively, per instrument, automatically.
- Low-volume nodes (LVN) inside a live impulse highlight where price moved through with little resistance — exactly the kind of level that tends to get revisited on a pullback.
- Because it's anchored to the ZigZag's own structure, the profile's boundaries always mean something (a real swing) — never an arbitrary lookback window.
- Combined with the existing Delta Zones pressure boxes, you now get **two independent confirmations at the same key levels**: pressure-based (Delta) and volume-based (Profile) — computed from the same single ZigZag call, with zero redundant computation.

═══════════════════════════════════

Same as always ▶ this is optional and a big change, so please test it on your usual instruments before relying on it, and keep the feedback coming. 🙏

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.