OPEN-SOURCE SCRIPT
Impulse %

Impulse % — Liquidation Cascade Detector (BTC · 1H)
Impulse % identifies sharp impulsive price moves and liquidation cascades by measuring how much a candle’s range deviates from its historical average in percent.
How it works
Calculates the candle range (in %) relative to price and compares it to the average over N periods.
When the range exceeds the upper band, an Impulse is detected.
Inside each 1H candle, the indicator checks lower timeframes (1m / 5m) to classify the impulse phases:
PANIC — the first minutes of a violent move (forced liquidations, stop hunts).
CAUTION (Cascade) — continuation and “cleanup” phase with elevated risk.
Determines whether the impulse is against the trend using EMA 50 / EMA 200 — the most dangerous scenario.
Highlights risk zones to protect positions and filter new entries.
What it’s for
Avoid entering during liquidation cascades.
Exit at break-even or partially take profit during risky phases.
Recommended Settings — BTC (1H)
Calculation
Calculation TF: (empty = current)
Average Mode: By N bars
N (bars): 100
Range Type: High–Low
Bands
Upper Band (% of average): 130
Lower Band: Auto (same %)
Cascade (First Minutes)
Enable Cascade Filter: ON
When to trigger safety: Only against trend
PANIC (minutes): 3
CAUTION (minutes after PANIC): 15
Trend (EMA)
Use EMA Trend: ON
Fast EMA: 50
Slow EMA: 200
Lower TF Detection
Lower TF: 1m (or 5m if you prefer smoother signals)
Visualization
Style: Columns
Show Bands: ON
Show Band Lines & Mean: ON
How to read it (BTC · 1H)
Purple (PANIC): first minutes of liquidation — do not enter.
Yellow (CAUTION): cascade phase — high risk, manage/exit.
Normal color: no active cascade — strategy allowed.
Best practice:
1m/5m → real-time cascade detection
1H → decision level
4H → market context
Impulse % identifies sharp impulsive price moves and liquidation cascades by measuring how much a candle’s range deviates from its historical average in percent.
How it works
Calculates the candle range (in %) relative to price and compares it to the average over N periods.
When the range exceeds the upper band, an Impulse is detected.
Inside each 1H candle, the indicator checks lower timeframes (1m / 5m) to classify the impulse phases:
PANIC — the first minutes of a violent move (forced liquidations, stop hunts).
CAUTION (Cascade) — continuation and “cleanup” phase with elevated risk.
Determines whether the impulse is against the trend using EMA 50 / EMA 200 — the most dangerous scenario.
Highlights risk zones to protect positions and filter new entries.
What it’s for
Avoid entering during liquidation cascades.
Exit at break-even or partially take profit during risky phases.
Recommended Settings — BTC (1H)
Calculation
Calculation TF: (empty = current)
Average Mode: By N bars
N (bars): 100
Range Type: High–Low
Bands
Upper Band (% of average): 130
Lower Band: Auto (same %)
Cascade (First Minutes)
Enable Cascade Filter: ON
When to trigger safety: Only against trend
PANIC (minutes): 3
CAUTION (minutes after PANIC): 15
Trend (EMA)
Use EMA Trend: ON
Fast EMA: 50
Slow EMA: 200
Lower TF Detection
Lower TF: 1m (or 5m if you prefer smoother signals)
Visualization
Style: Columns
Show Bands: ON
Show Band Lines & Mean: ON
How to read it (BTC · 1H)
Purple (PANIC): first minutes of liquidation — do not enter.
Yellow (CAUTION): cascade phase — high risk, manage/exit.
Normal color: no active cascade — strategy allowed.
Best practice:
1m/5m → real-time cascade detection
1H → decision level
4H → market context
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.