PROTECTED SOURCE SCRIPT

1BullBear™ Statistics

273
Overview
1BullBear™ Statistics is a comprehensive volume delta analysis tool that transforms raw order flow data into actionable visual insights. This indicator displays seven key metrics in a clean, gradient-based heatmap format below your price chart, helping you identify significant buying and selling pressure in real-time.

Key Features: Seven Essential Metrics

  1. Volume - Total volume per bar with threshold highlighting
  2. Delta - Net buying/selling pressure (Buy Volume - Sell Volume)
  3. Cumulative Delta - Session-based running total of delta
  4. Delta Ratio - Delta expressed as a percentage of total volume
  5. Minimum - Lowest delta value within the bar's timeframe
  6. Maximum - Highest delta value within the bar's timeframe
  7. Standard Deviation - Statistical measure of delta volatility within the session



Intelligent Gradient Visualization
  • Dynamic color intensity based on historical significance
  • Adaptive scaling using configurable lookback periods (10-200 bars)
  • Threshold-based highlighting to immediately spot extreme values
  • Separate bull/bear coloring for directional clarity
  • Customizable transparency for optimal chart integration


Flexible Configuration
  • Toggle any metric on/off to focus on what matters
  • Custom labels - rename metrics to your preference
  • Independent color schemes for each row
  • Adjustable thresholds for highlighting significant values
  • Multiple text sizes from tiny to huge
  • Session-aware calculations that reset at market open


Real-Time Updates
  • Confirmed bars display permanent historical data
  • Current bar updates in real-time as price action develops
  • Efficient rendering with automatic cleanup of previous bars
  • Handles up to 500 boxes for extensive historical analysis


How It Works
The indicator uses TradingView's native volume delta data (sourced from lower timeframe aggregation) to calculate order flow statistics. Each metric is displayed as a colored box below the chart, with gradient intensity representing the value's significance relative to recent history.

Gradient Logic:

Stronger colors = more significant values relative to the lookback period
Transparent backgrounds = values below threshold (filtered out)
Color saturation scales from 0% to your set maximum opacity
Session Management:

Cumulative Delta and Standard Deviation reset at each new trading session
Session detection uses exchange timezone for accurate daily calculations
Historical lookback maintains a rolling window for gradient intensity

Ideal Use Cases
  • Scalping & Day Trading - Identify aggressive buying/selling in real-time
  • Order Flow Analysis - Understand market participant behavior
  • Divergence Detection - Spot when price and delta disagree
  • Volume Profile Context - Complement VP analysis with granular delta data
  • Breakout Confirmation - Verify price moves with volume delta agreement
  • Default Thresholds


The indicator comes pre-configured with sensible defaults for futures trading:

Volume: Highlights bars above 1,500 contracts
  • Delta: Flags extremes beyond ±500
  • Delta Ratio: Alerts on imbalances beyond ±70%
  • Min/Max: Range filter of ±10 for precision
  • Std Dev: Highlights outliers beyond ±0.7 standard deviations
  • Adjust these values based on your instrument and timeframe.


Technical Notes
  • Requires real-time volume delta data from your broker
  • Works best on instruments with strong volume (futures, major stocks, crypto)
  • Lower timeframe aggregation defaults to 1-second or 1-minute depending on chart timeframe
  • Optimized performance with efficient array management and conditional rendering


Compatibility
  • Pine Script™ v6
  • All timeframes supported
  • Best results on liquid instruments with reliable volume data
  • Integrates seamlessly with other TradingView indicators


Created by KweeBoss_ | Licensed under Mozilla Public License 2.0

Note: This indicator analyzes historical and real-time volume data. Past performance does not guarantee future results. Always combine with other forms of analysis and proper risk management.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.