OPEN-SOURCE SCRIPT
Обновлено

Short-Timeframe Volume Spike Detector

412
Short-Timeframe Volume Spike Detector

Description:

The Short-Timeframe Volume Spike Detector is an advanced multi-timeframe (MTF) indicator that automatically detects sudden volume surges and price expansion events on a lower timeframe and displays them on a higher (base) timeframe chart — helping traders identify hidden intraday accumulation or breakout pressure within broader candles.

⚙️ How It Works

Select a Base Timeframe (e.g., Daily, 4H, 1H).

The script automatically fetches data from a Lower Timeframe (e.g., Daily → 1H, 1H → 15m).

Within each base bar, it scans all the lower timeframe candles to find:

Volume Spikes: Volume exceeds average × multiplier or a custom threshold.

Price Strength: Candle shows upward movement beyond a minimum % change.

When both conditions are met, a spike signal is plotted on the higher timeframe chart.

🔍 Features

✅ Automatic Lower Timeframe Mapping — Dynamically selects the most relevant lower timeframe.
✅ Two Detection Modes:

Multiplier Mode: Volume spikes defined as multiple of average lower timeframe volume.

Manual Mode: Custom absolute volume threshold.
✅ Trend Filter Option: Show only signals during uptrends (configurable).
✅ Visual Markers:

Purple “X” = Volume Spike Detected

Dotted red & green lines = Candle range extension
✅ Custom Label Placement: Above High / Below Low / At Spike Price
✅ Debug Mode: Displays full diagnostic info including detected volume, threshold, and % change.

📊 Use Cases

Detect early accumulation in daily candles using hourly or 15-min data.

Identify institutional buying interest before visible breakouts.

Confirm strong continuation patterns after price compression.

Spot hidden intraday activity on swing or positional charts.

🧩 Inputs Overview
Input Description
Base Timeframe Main chart timeframe for analysis
Lookback Bars Number of recent candles to scan
Volume Mode “Multiplier” or “Manual Benchmark”
Volume Multiplier Multiplier applied to average lower timeframe volume
Manual Volume Threshold Fixed volume benchmark
Min Price Change % Minimum lower timeframe candle % move to qualify
Use Trend Filter Only show in uptrend (close > close[5])
Extend Bars Number of bars to extend dotted lines
Label Position Choose Above High / Below Low / At Spike Price
Debug Mode Show live internal values for calibration
🧠 Tips

Ideal for swing traders and multi-timeframe analysts.

Works best when base = Daily and lower = Hourly or 15m.

Combine with Volume Profile, VWAP, or RRG-style analysis for stronger confluence.

Use Multiplier 1.5–2.5 to fine-tune for your asset’s volatility.

⚠️ Notes

Works only when applied to the base timeframe selected in inputs.

May not display signals on non-standard intraday timeframes (like 3H).

Labels limited to max_labels_count for performance stability.
Информация о релизе
🔍 How It Works
1️⃣ Uses your chart timeframe
There is no base TF input.
Whatever timeframe your chart is on → that is used automatically.
Example:
If chart TF = 1H → internal lower TF = 15m
If chart TF = 4H → internal lower TF = 1H
If chart TF = 1D → internal lower TF = 1H
If chart TF = 30m → internal lower TF = 5m
The lower timeframe is always roughly ¼th of the chart timeframe.
⛔ 2️⃣ Restriction: Only works on TF > 15 mins
To reduce noise and avoid fake spikes:
❌ 1m
❌ 3m
❌ 5m
❌ 15m
are blocked.
You will see a warning:
⚠️ Use timeframe > 15 minutes
Allowed:
✔ 30m, 45m, 1H, 2H, 4H, D, W, M
📊 3️⃣ Lower Timeframe Candle Scan
For every new higher timeframe bar, the script requests lower-TF OHLC + volume data.
It checks the last N bars of the chart timeframe (default = 5 bars):
Inside each of those bars, all child candles in lower TF are analyzed.
🔥 4️⃣ Spike Logic
A spike is detected when BOTH conditions are true:
A. Volume Spike
You choose:
Mode 1: Multiplier Mode
Volume spike =
volume > (average volume × your multiplier)
Example: avg vol 100k × multiplier 2 → threshold = 200k
Mode 2: Manual Volume Benchmark
You set a fixed threshold (e.g., 100,000).
B. Positive Price Action
The lower timeframe candle must also have:
% price increase > your minimum threshold
(Default = 1%)
Only when both conditions match, a signal is generated.
📍 5️⃣ Signal Display
When a valid spike is found:
✔ Purple cross below the bar
Shows exactly where the spike happened.
✔ Dotted Red Line
Marks high of the higher timeframe candle.
✔ Dotted Green Line
Marks low of the higher timeframe candle.
✔ Spike Label
Shows precise spike price (customizable position).
📈 6️⃣ Trend Filter (Optional)
If enabled:
Signal only shows when:
close > close[5]
This ensures:
only uptrend spikes
no noise during downtrends
You can turn this ON/OFF.
🔧 7️⃣ Debug Mode
If enabled, a label appears showing:
Chart timeframe
Lower timeframe chosen
Trend Up status
Maximum LTF volume
Volume threshold
Max % change found
Whether spike was detected
Great for tuning and validation.
🎯 Why This Indicator Is Useful
✔ Detects institutional activity hidden in lower timeframes
✔ Finds aggressive volume-plus-price candles that trigger strong moves
✔ Automatically adapts to any chart timeframe
✔ Reduces noise by blocking micro timeframes
✔ Ideal for swing trading, positional entries, and early momentum detection
Perfect for identifying:
momentum ignition
high volume absorption
pre-breakout moves
sudden lower-TF expansions inside a clean HTF trend
Информация о релизе
getLowerTimeframe(tf) =>
if tf == "D" or tf == "1D"
"60"
else if tf == "W" or tf == "1W"
"D"
else if tf == "240" or tf == "4H"
"60"
else if tf == "60" or tf == "1H" or tf == "H"
"15"
else if tf == "30"
"5"
else if tf == "15"
"5"
else if tf == "10"
"3"
else if tf == "5"
"1"
else
"1"

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.