INVITE-ONLY SCRIPT

High Threshold Volume Bar

59
High Threshold Volume Bar (HP Vol Bar) has the following features highlighted below.

Overview:
The High Threshold Volume Bar (HP Vol Bar) is an advanced technical analysis tool designed to identify statistically significant price bars based on volume, range, and trend dynamics. It helps traders spot high-probability continuation or reversal setups by analyzing bar size relative to historical volatility, volume spikes, and trend strength.

Key Features
1. Adaptive Threshold Detection

.Uses standard deviation bands and moving averages to dynamically adjust the significance threshold based on recent market conditions.

.Bars exceeding this threshold are flagged as "significant" and color-coded for easy identification.

2. Volume & Range Normalization

.Adjusts bar size calculations by factoring in volume spikes (relative to SMA-smoothed volume) and full price range (high-low or just body size).

.Prevents false signals by capping extreme volume outliers.

3. Trend Strength & Direction

Incorporates Directional Movement (DMI) to assess trend strength.

Classifies signals as continuation or reversal based on trend alignment.

4. Percentile Ranking

.Compares current bar size against a lookback period (default: 100 bars) to determine its statistical rarity (top 20% = high significance).

5. Consecutive Signal Filtering

.Requires multiple consecutive significant bars (configurable) to confirm high-probability setups, reducing noise.

6. Visual & Alert System

.Color-coded bars:

.Blue (Bullish Continuation) / Pink (Bearish Continuation) for high-probability signals.

.Teal (Bullish) / Maroon (Bearish) for significant but unconfirmed bars.

.Info Table: Displays real-time metrics (signal type, percentile, trend strength, volatility regime).

.Alerts: Triggers when a high-probability sequence is detected.

Input Parameters
1. Parameter Description Default
2. SMA Length Smoothing period for average bar size. 50
3. Standard Deviation Period Lookback for volatility calculation. 20
4. Standard Deviation Multiplier Adjusts sensitivity of threshold. 2.5
5. Factor in Volume Normalizes bar size using volume. true
6. Use Full Range Measures high-low instead of open-close. true
7. Min Consecutive Bars Required confirmations for high-probability signals. 2
8. Historical Comparison Period Lookback for percentile ranking. 100
9. Trend Strength Period Smoothing for DMI-based trend assessment. 14

How It Works
1. Calculates Bar Size:

.Uses either full range (high-low) or body size (open-close).

.Adjusts for volume spikes via EMA-normalized volume.

2. Determines Significance:

.Bar size must exceed:

.Adaptive threshold = SMA + (StdDev × Multiplier × Volatility Factor).

.Percentile rank > 80% (top 20% of recent bars).

.Trend strength > 20% (DMI-derived).

3. Classifies Signals:

.Continuation: Significant bar aligns with prior trend.

.Reversal: Significant bar contradicts prior trend.

4. Confirms High-Probability Setups:

.Requires consecutive significant bars (user-defined) to filter noise.

7. Usage Guidelines
.Bullish Signals: Look for blue bars (confirmed) or teal bars (unconfirmed) in uptrends.

.Bearish Signals: Look for pink bars (confirmed) or maroon bars (unconfirmed) in downtrends.
.Alerts: Use built-in alerts to notify when a high-probability sequence forms.

.Combine With: Support/resistance levels, candlestick patterns, or momentum oscillators for confluence.

8. Why This Script?
.Dynamic Adaptation: Adjusts to changing volatility and volume regimes.

.Statistical Rigor: Uses percentile ranking to avoid overfitting.

.Clear Visuals: Intuitive color-coding and table for quick analysis.

Note: This is a closed-source script, but the logic is transparently explained to ensure traders understand its methodology.

How to Use "High Threshold Volume Bar" for Trade Entries
The HP Vol Bar indicator identifies high-probability trade setups based on statistically significant price bars. Here’s how to use it for entries, exits, and trade management:

1. Trade Entry Rules (Table Values to consider to trade)
A) Bullish Continuation Setup (Trend Following)
Conditions:
✅Signal Status: Active
✅ Signal Type: bullish_cont (Blue,Teal bar)
✅Size percentile: 90%
✅ Trend Strength: > 20% (Strong trend)
✅ Consecutive Bars: ≥ 1or2
✅ Volume Regime : High

Entry:

.Buy at the close of the second (or Nth) confirmed blue bar.

.Stop Loss (SL): Below the lowest bar in the sequence.

.Take Profit (TP):

1.5× to 2× the bar size (adaptive to volatility).


Example:
Bearish Continuation Example

B) Bearish Continuation Setup (Trend Following)
Conditions:
✅Signal Status: Active
✅ Signal Type: bearish_cont (Pink bar)
✅Size percentile: 90%
✅ Trend Strength: > 20%
✅ Consecutive Bars: ≥ 1or2
✅ Volume Regime : High
Entry:

Sell Short at the close of the second (or Nth) confirmed pink bar.

Stop Loss (SL): Above the highest bar in the sequence.

Take Profit (TP): Similar to bullish (1.5-2× bar size).

C) Bullish/Bearish Reversal Setup (Counter-Trend)
Conditions:
✅Signal Status: Active
✅ Signal Type: bullish_rev or bearish_rev
✅Size percentile: 90%
✅ Trend Strength: > 20%
✅ Consecutive Bars: ≥ 1or2
✅ Volume Regime : High
Entry:

Wait for confirmation (next bar closes in reversal direction).

SL: Opposite extreme of the signal bar.

Example:
Reversal Example

2. Filtering & Confluence (Improving Accuracy)
Trend Alignment: Only trade in the direction of the higher timeframe trend (e.g., use EMA 50/200)

Support/Resistance: Enter near key levels for better risk-reward.

Volume Confirmation: Avoid signals with below-average volume.

3. Advanced Strategies
A) Breakout Confirmation
If a significant bar breaks a key level, enter on retest.

Example: Blue bar breaks resistance → Buy on pullback.

B) Mean Reversion (Range Markets)
Use low volatility mode (volRegimeText = "LOW") + reversal signals.

Fade extreme moves back to the mean (e.g., SMA).istantanea

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.