OPEN-SOURCE SCRIPT
Adaptive BSP v6

The Adaptive Buying and Selling Pressure (ABSP) indicator is the "engine" of your system. Unlike standard volume oscillators that just look at total quantity, this logic dissects the internal price action of every candle to determine who is actually in control.
1. The Core Calculation (Intra-Bar Delta)
Instead of just looking at the candle color, the ABSP logic calculates pressure based on where the price closes relative to the high and low of the bar:
• Buying Pressure (BP): Measured as the distance from the candle's Low to its Close.
BP = Close - min(Low, Close)
• Selling Pressure (SP): Measured as the distance from the candle's High to its Close.
SP = max(High, Close) - Close
2. The Adaptive Lookback (The "Pulse")
Standard indicators use a "static" period (like 14 or 20). The ABSP is different; it uses the Market Pulse to change its own length:
• It tracks the number of bars since the last significant structural pivot.
• If the market is moving fast with frequent pivots, the lookback shortens (more sensitive).
• If the market is trending smoothly without pivots, the lookback lengthens (more stable).
3. Statistical Normalization (Z-Score)
To make the data readable across different assets (like Crypto vs. Forex), we apply a Z-Score calculation. This measures how many standard deviations the current pressure is away from the mean:
• Neutral: Z = approx 0 (Balanced market).
• High Intensity: Z > 2.0 (Significant buying surge).
• Extreme Exhaustion: Z > 3.0 (Potential blow-off top/bottom).
4. Key Logic Points
Feature | Function | Trading Benefit
=============================
Net Delta | Subtracts SP from BP. | Instant view of which side is winning the tug-of-war.
----------------------------------------------------------------------------
EMA Smoothing | Uses a Series EMA on the raw values. | Filters out "noise" while remaining responsive to price.
----------------------------------------------------------------------------
Divergence Logic | Compares Price Highs to Pressure Highs. | Flags when a trend is losing "gas" before price actually drops.
----------------------------------------------------------------------------
Z-Intensity Filter | Only flags "PRO" signals at extremes. | Ensures you aren't entering during "retail chop."
How it drives the "Fusion" System:
In your current setup, the ABSP acts as the ultimate filter. A "Wave" is just a zig-zag on the chart, but the ABSP tells the script: "This wave is legitimate because the Z-Score is at 2.1 and Buying Pressure is exponentially higher than Selling Pressure."
Would you like me to add a specific "Exhaustion" alert to the ABSP logic that pings you when the Z-Score hits an extreme level (>3.0), even if a new wave hasn't formed yet?
1. The Core Calculation (Intra-Bar Delta)
Instead of just looking at the candle color, the ABSP logic calculates pressure based on where the price closes relative to the high and low of the bar:
• Buying Pressure (BP): Measured as the distance from the candle's Low to its Close.
BP = Close - min(Low, Close)
• Selling Pressure (SP): Measured as the distance from the candle's High to its Close.
SP = max(High, Close) - Close
2. The Adaptive Lookback (The "Pulse")
Standard indicators use a "static" period (like 14 or 20). The ABSP is different; it uses the Market Pulse to change its own length:
• It tracks the number of bars since the last significant structural pivot.
• If the market is moving fast with frequent pivots, the lookback shortens (more sensitive).
• If the market is trending smoothly without pivots, the lookback lengthens (more stable).
3. Statistical Normalization (Z-Score)
To make the data readable across different assets (like Crypto vs. Forex), we apply a Z-Score calculation. This measures how many standard deviations the current pressure is away from the mean:
• Neutral: Z = approx 0 (Balanced market).
• High Intensity: Z > 2.0 (Significant buying surge).
• Extreme Exhaustion: Z > 3.0 (Potential blow-off top/bottom).
4. Key Logic Points
Feature | Function | Trading Benefit
=============================
Net Delta | Subtracts SP from BP. | Instant view of which side is winning the tug-of-war.
----------------------------------------------------------------------------
EMA Smoothing | Uses a Series EMA on the raw values. | Filters out "noise" while remaining responsive to price.
----------------------------------------------------------------------------
Divergence Logic | Compares Price Highs to Pressure Highs. | Flags when a trend is losing "gas" before price actually drops.
----------------------------------------------------------------------------
Z-Intensity Filter | Only flags "PRO" signals at extremes. | Ensures you aren't entering during "retail chop."
How it drives the "Fusion" System:
In your current setup, the ABSP acts as the ultimate filter. A "Wave" is just a zig-zag on the chart, but the ABSP tells the script: "This wave is legitimate because the Z-Score is at 2.1 and Buying Pressure is exponentially higher than Selling Pressure."
Would you like me to add a specific "Exhaustion" alert to the ABSP logic that pings you when the Z-Score hits an extreme level (>3.0), even if a new wave hasn't formed yet?
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.