OPEN-SOURCE SCRIPT
מעודכן Buy/Sell Pressure Meter [AGPro Series]

Buy/Sell Pressure Meter [AGPro Series]
🔹 Overview
Buy/Sell Pressure Meter is a volume-flow analytics tool that quantifies the tug-of-war between buyers and sellers on every bar and on a rolling basis. Unlike traditional volume delta indicators that only plot raw bar-level buy minus sell, this tool layers four complementary lenses into a single oscillator: rolling pressure trend, imbalance streak tracking, intraday pressure shift count, and session-accumulated dominance. A subtle price-pane background tint gives a Bookmap-light read on intraday participation that works across crypto, futures, and liquid equities — without requiring tick-level order flow data.
🔹 Unique Edge
Most volume-delta scripts answer the question "which side was bigger on this bar?" This one answers a different, more useful question for intraday traders: "who has been in control, and how stable is that control?"
• Rolling Pressure Trend — a moving average of buy and sell pressure separately (dual histogram), so you see structural bias, not just bar-to-bar noise.
• Imbalance Streak Tracking — counts consecutive same-side dominant bars and labels only the final length of each significant streak at the moment the streak breaks. No per-bar label spam, one clean marker per event.
• Intraday Pressure Shift Count — how many times the rolling dominant side has flipped since session open. High shift count = rotational day. Low shift count = trending day.
• Session-Accumulated Net Delta — cumulative bull vs bear contribution since the day began, independent of the rolling window.
• Price-Pane Bookmap-Light Tint — a very high-transparency background tint paints the main chart pane when one side is rolling-dominant, so you see control visually without leaving the price chart.
These five lenses together are deliberately designed not to overlap with raw volume-delta or cumulative-volume-delta indicators. They describe the character of participation, not just its magnitude.
🔹 Methodology
Because standard chart data does not include true tick-level order flow, this script uses a widely-accepted proxy: up-bar volume is attributed to buy pressure, down-bar volume to sell pressure, and doji volume is split evenly. This is explicitly a simulated bias — not real bid/ask flow — and the script labels it as such in the panel.
From that proxy:
1. Current-bar bull pressure percentage = buyPressure / (buyPressure + sellPressure) × 100.
2. Rolling pressure = SMA of buy and sell pressure over the user-defined window (default 20 bars).
3. A bar is classified bull-dominant when its bull pressure percent exceeds the dominance threshold (default 55%), and bear-dominant at the mirror level.
4. Streaks count consecutive bars of the same classification and reset when a neutral or opposite bar prints. Peak length is captured at the moment of reset and optionally labelled on chart.
5. Pressure shifts compare the current rolling dominant side against the last confirmed non-neutral dominant side; a change increments the intraday shift counter (only on intraday timeframes).
6. Session delta is the cumulative net delta since the last daily rollover.
🔹 Signals & States
• Dual histogram — buy pressure (teal, upward) and sell pressure (pink, downward) plotted as rolling averages.
• Net delta center line — accent-colored line showing rolling buy minus sell.
• Price-pane background tint — subtle teal or pink when one side is rolling-dominant, gives a Bookmap-light feel without obscuring candles.
• Oscillator-pane echo tint — even more subtle tint mirroring the dominant side in the indicator pane.
• Shift markers — triangles on the pane when the dominant side flips.
• Streak peak labels — plotted only at streak termination, showing final length (e.g. "Bull 7").
• Alerts — pressure shift to bull, pressure shift to bear, bull imbalance streak, bear imbalance streak.
🔹 Key Inputs
Calculation:
• Rolling Pressure Length — default 20. Higher = smoother, slower reaction.
• Minimum Streak To Highlight — default 3. Used for alerts.
• Dominance Threshold — default 55%. Share of total pressure needed to classify a bar as dominant.
Visuals:
• Tint Price Pane On Dominance — toggles the Bookmap-light effect on the main chart.
• Show Streak Peak Labels + Minimum Streak Length To Label (default 5) — controls chart cleanliness.
• Show Pressure Shift Events — triangle markers on shifts.
• Background Tint Transparency — default 94, adjustable 80-99.
Panel:
• Panel Location, Theme (Dark / Light), Font Size, Label Font Size — all default to Normal and fully configurable.
🔹 How To Use
This is an analytical tool, not a standalone trading system. Typical use cases:
• Confirmation — when price breaks a structure level while the rolling net delta is strongly in the break direction and a streak is in progress, the break has participation behind it.
• Exhaustion — a long bull streak peak followed by a rolling shift to bear, or vice versa, often marks the end of the current impulse.
• Regime read — a day with many intraday pressure shifts is rotational; a day with 0-1 shifts is directional. Adjust your playbook accordingly.
• Companion to S/R, supply/demand, and volume profile tools — use the streak peak and shift events as a participation filter when price interacts with a zone.
Best results on liquid instruments with meaningful bar-to-bar volume variation. Low-volume illiquid tickers produce noisier readings.
🔹 Limitations & Transparency
• The buy vs sell attribution is a proxy derived from bar direction and bar volume. It is not real order flow, Level 2, or tick data. Bookmap, CVD from exchange feeds, and footprint tools access information that bar-level scripts structurally cannot replicate.
• On instruments or timeframes where many bars close near their open (doji-heavy regimes), proxy-based attribution becomes less informative.
• The intraday shift counter is only meaningful on intraday timeframes; on daily-and-above timeframes the panel explicitly shows this as n/a.
• The script is non-repainting on closed bars. Intrabar values update in real time and may change until the bar confirms.
• Pressure shifts and streaks describe past and current state. They are not predictions of future price.
🔹 Risk Disclosure
This script is provided as an analytical tool for educational and research purposes. It does not constitute financial advice, a trading signal, or a recommendation to buy or sell any asset. Past performance of any pattern, streak, or shift event does not guarantee future results. Users are solely responsible for their own trading decisions and risk management. Always combine any indicator with broader market context, position sizing discipline, and your own due diligence.
🔹 Overview
Buy/Sell Pressure Meter is a volume-flow analytics tool that quantifies the tug-of-war between buyers and sellers on every bar and on a rolling basis. Unlike traditional volume delta indicators that only plot raw bar-level buy minus sell, this tool layers four complementary lenses into a single oscillator: rolling pressure trend, imbalance streak tracking, intraday pressure shift count, and session-accumulated dominance. A subtle price-pane background tint gives a Bookmap-light read on intraday participation that works across crypto, futures, and liquid equities — without requiring tick-level order flow data.
🔹 Unique Edge
Most volume-delta scripts answer the question "which side was bigger on this bar?" This one answers a different, more useful question for intraday traders: "who has been in control, and how stable is that control?"
• Rolling Pressure Trend — a moving average of buy and sell pressure separately (dual histogram), so you see structural bias, not just bar-to-bar noise.
• Imbalance Streak Tracking — counts consecutive same-side dominant bars and labels only the final length of each significant streak at the moment the streak breaks. No per-bar label spam, one clean marker per event.
• Intraday Pressure Shift Count — how many times the rolling dominant side has flipped since session open. High shift count = rotational day. Low shift count = trending day.
• Session-Accumulated Net Delta — cumulative bull vs bear contribution since the day began, independent of the rolling window.
• Price-Pane Bookmap-Light Tint — a very high-transparency background tint paints the main chart pane when one side is rolling-dominant, so you see control visually without leaving the price chart.
These five lenses together are deliberately designed not to overlap with raw volume-delta or cumulative-volume-delta indicators. They describe the character of participation, not just its magnitude.
🔹 Methodology
Because standard chart data does not include true tick-level order flow, this script uses a widely-accepted proxy: up-bar volume is attributed to buy pressure, down-bar volume to sell pressure, and doji volume is split evenly. This is explicitly a simulated bias — not real bid/ask flow — and the script labels it as such in the panel.
From that proxy:
1. Current-bar bull pressure percentage = buyPressure / (buyPressure + sellPressure) × 100.
2. Rolling pressure = SMA of buy and sell pressure over the user-defined window (default 20 bars).
3. A bar is classified bull-dominant when its bull pressure percent exceeds the dominance threshold (default 55%), and bear-dominant at the mirror level.
4. Streaks count consecutive bars of the same classification and reset when a neutral or opposite bar prints. Peak length is captured at the moment of reset and optionally labelled on chart.
5. Pressure shifts compare the current rolling dominant side against the last confirmed non-neutral dominant side; a change increments the intraday shift counter (only on intraday timeframes).
6. Session delta is the cumulative net delta since the last daily rollover.
🔹 Signals & States
• Dual histogram — buy pressure (teal, upward) and sell pressure (pink, downward) plotted as rolling averages.
• Net delta center line — accent-colored line showing rolling buy minus sell.
• Price-pane background tint — subtle teal or pink when one side is rolling-dominant, gives a Bookmap-light feel without obscuring candles.
• Oscillator-pane echo tint — even more subtle tint mirroring the dominant side in the indicator pane.
• Shift markers — triangles on the pane when the dominant side flips.
• Streak peak labels — plotted only at streak termination, showing final length (e.g. "Bull 7").
• Alerts — pressure shift to bull, pressure shift to bear, bull imbalance streak, bear imbalance streak.
🔹 Key Inputs
Calculation:
• Rolling Pressure Length — default 20. Higher = smoother, slower reaction.
• Minimum Streak To Highlight — default 3. Used for alerts.
• Dominance Threshold — default 55%. Share of total pressure needed to classify a bar as dominant.
Visuals:
• Tint Price Pane On Dominance — toggles the Bookmap-light effect on the main chart.
• Show Streak Peak Labels + Minimum Streak Length To Label (default 5) — controls chart cleanliness.
• Show Pressure Shift Events — triangle markers on shifts.
• Background Tint Transparency — default 94, adjustable 80-99.
Panel:
• Panel Location, Theme (Dark / Light), Font Size, Label Font Size — all default to Normal and fully configurable.
🔹 How To Use
This is an analytical tool, not a standalone trading system. Typical use cases:
• Confirmation — when price breaks a structure level while the rolling net delta is strongly in the break direction and a streak is in progress, the break has participation behind it.
• Exhaustion — a long bull streak peak followed by a rolling shift to bear, or vice versa, often marks the end of the current impulse.
• Regime read — a day with many intraday pressure shifts is rotational; a day with 0-1 shifts is directional. Adjust your playbook accordingly.
• Companion to S/R, supply/demand, and volume profile tools — use the streak peak and shift events as a participation filter when price interacts with a zone.
Best results on liquid instruments with meaningful bar-to-bar volume variation. Low-volume illiquid tickers produce noisier readings.
🔹 Limitations & Transparency
• The buy vs sell attribution is a proxy derived from bar direction and bar volume. It is not real order flow, Level 2, or tick data. Bookmap, CVD from exchange feeds, and footprint tools access information that bar-level scripts structurally cannot replicate.
• On instruments or timeframes where many bars close near their open (doji-heavy regimes), proxy-based attribution becomes less informative.
• The intraday shift counter is only meaningful on intraday timeframes; on daily-and-above timeframes the panel explicitly shows this as n/a.
• The script is non-repainting on closed bars. Intrabar values update in real time and may change until the bar confirms.
• Pressure shifts and streaks describe past and current state. They are not predictions of future price.
🔹 Risk Disclosure
This script is provided as an analytical tool for educational and research purposes. It does not constitute financial advice, a trading signal, or a recommendation to buy or sell any asset. Past performance of any pattern, streak, or shift event does not guarantee future results. Users are solely responsible for their own trading decisions and risk management. Always combine any indicator with broader market context, position sizing discipline, and your own due diligence.
הערות שחרור
🔧 UPDATE NOTES - v1.3This update focuses on chart readability, signal prominence, and premium presentation.
The core purpose of the script remains unchanged.
This release improves how the existing buy/sell pressure logic is presented and interpreted on the chart.
This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
- Subtler price-pane dominance tint
The Bookmap-light background tint on the price pane is now lighter by default, so the candles stay the focus and the dominance wash reads as a clean accent instead of heavy color banding.
- Premium streak labels
Streak peak labels (such as Bull 6 / Bear 5) are now rendered as filled state-color chips with white text, so they stand out clearly as the primary on-pane markers.
- Panel readability across light and dark themes
Panel values now use theme-aware colors, so every row stays clearly readable whether the panel is set to dark or light.
- Cleaner first-glance interpretation
With the tint lightened and the streak chips refined, the overall layout reads faster and feels more premium at a glance.
------------------------
Visual Improvements
------------------------
- Reduced visual weight of the price-pane tint to enhance first-glance interpretation
- Refined the streak labels into clear, filled state-color chips
- Improved color contrast for the dual histogram, net line, and labels to coexist cleanly
- Adjusted default visual settings for a more balanced appearance
------------------------
Interface & Usability
------------------------
- Optimized panel color contrast for clearer information flow in both themes
- Improved label readability for better chart interaction
- Cleaned up rendered text for consistent presentation
- Enhanced overall presentation without changing core logic
------------------------
Behavior Notes
------------------------
This update does not change the core analytical logic of the script.
The goal is to improve clarity and usability, not to introduce new predictive behavior.
Users should interpret outputs the same way as before, but with improved visual structure.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical and visualization tool.
Buy/sell pressure here is a proxy derived from up-bar and down-bar volume, not true order flow.
Market conditions such as volatility, liquidity, and timeframe differences may affect how the histogram, tint, and labels appear.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
הערות שחרור
A🔧 UPDATE NOTES - v1.4This update focuses on reliability transparency and label contrast.
The core purpose of the script remains unchanged. This release adds a self-measured reliability readout and refines label legibility. It continues to function as an analytical and visualization tool. It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
• Added a Pressure Hit Rate readout.
After each rolling-dominance shift, the meter waits a configurable proof window and checks whether price actually moved in the new dominant direction, then reports an honest, self-measured follow-through rate in the panel.
• Standardized streak-label contrast.
Bull and Bear streak peak labels now compute readable text color automatically from their background, so they stay legible on both dark and light layouts.
• Kept the methodology and tool-type disclosures.
The panel continues to state clearly that the read is an up/down-bar volume proxy and an analytical tool, not a strategy.
------------------------
Visual Improvements
------------------------
• Improved streak-label readability across themes.
• Preserved the clean dual-histogram and net-delta presentation.
• Kept streak labels selective so the oscillator pane stays uncrowded.
• Maintained the subtle Bookmap-light dominance tint without overpowering candles.
------------------------
Interface & Usability
------------------------
• Added a Pressure Hit Rate row to the info panel for at-a-glance reliability context.
• Improved label legibility without changing the histogram or net-delta logic.
• Kept panel layout and information flow consistent and easy to scan.
• Enhanced overall user experience without changing the core pressure calculation.
------------------------
Behavior Notes
------------------------
This update does not change the core analytical logic of the script.
The goal is to improve clarity and reliability transparency, not to introduce new predictive behavior.
Users should interpret outputs the same way as before, now with an added follow-through reference.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool based on an up/down-bar volume proxy, not true order flow.
Market conditions such as volatility, liquidity, and timeframe differences may affect how pressure, streaks, and the hit rate appear.
Outputs should always be interpreted within broader market context.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
Public-free scripts + invite-only AGPro workflows for market analysis, liquidity context, risk planning and execution review.
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
Public-free scripts + invite-only AGPro workflows for market analysis, liquidity context, risk planning and execution review.
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.