OPEN-SOURCE SCRIPT
Relative Volume Heat [forexobroker]

Relative Volume Heat [forexobroker] turns raw volume into a participation regime. It measures how today's volume compares to its own recent baseline, then z-scores that ratio to classify the market as COLD, WARM or HOT. Directional entries are only allowed while the regime is HOT, so signals only print when real participation is behind the move. A heatmap background visualises regime intensity at a glance.
🔶 ALGORITHM
1. Compute RVOL = volume / SMA(volume, Volume MA Length).
2. Z-score the RVOL ratio over the RVOL Z Window: rz = (RVOL - mean) / stdev.
3. Classify the regime: rz >= Hot Z = HOT (2), rz >= Warm Z = WARM (1), else COLD (0).
4. A trend EMA defines directional bias: close above = up, below = down.
5. A separate reclaim EMA times the entry: a confirmed close-cross of it in the bias direction inside a HOT (or optionally WARM) regime is the trigger.
6. A cooldown, bar-close confirmation and a position-lock gate the final signal so it never repaints intrabar and never stacks the same side.
🔶 SIGNAL LOGIC
- Buy: in-session AND regime tradable AND trend direction up AND close crosses over the reclaim EMA AND position not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: in-session AND regime tradable AND trend direction down AND close crosses under the reclaim EMA AND position not already short AND cooldown elapsed AND barstate.isconfirmed.
Only fires while the RVOL z-score regime is HOT (or WARM if "Trade Only When Hot" is off).
🔶 INPUTS
- RVOL group: Volume MA Length baseline for the relative-volume ratio (default 20).
- RVOL group: RVOL Z Window the ratio is z-scored over (default 50).
- RVOL group: Hot Z Threshold above which trading is enabled (default 1.0).
- RVOL group: Warm Z Threshold separating WARM from COLD (default 0.0).
- RVOL group: Trend EMA defining directional bias inside a hot regime (default 34).
- Signal Logic group: Entry Reclaim EMA whose close-cross times entries (default 9).
- Signal Logic group: Trade Only When Hot toggle and Cooldown Bars between signals (default 5).
- Filters group: optional session restriction with a configurable window (default off).
- Visual group: dashboard, 3-layer glow, heat background and buy/sell colors (dashboard default on).
🔶 ALERTS
RVH Buy, RVH Sell, RVH Any Signal, RVH Hot On, RVH Hot Off, RVH Warm, RVH Cold, RVH EMA Up, RVH EMA Down, RVH Trend Cross, RVH Hot Now, RVH Armed, RVH Webhook JSON.
🔶 LIMITATIONS
- Needs warm-up bars before the z-score window and trend EMA are fully populated.
- Volume-based, so it requires a real volume feed; on forex it falls back to broker tick-volume, which is a proxy only.
- COLD and WARM regimes intentionally suppress signals, so quiet markets produce few or no entries.
- Defaults are tuned for liquid instruments and intraday/swing timeframes; thin symbols may need a higher Volume MA Length.
- The regime classifies participation, not direction; bias still depends on the trend and reclaim EMAs.
🔶 ALGORITHM
1. Compute RVOL = volume / SMA(volume, Volume MA Length).
2. Z-score the RVOL ratio over the RVOL Z Window: rz = (RVOL - mean) / stdev.
3. Classify the regime: rz >= Hot Z = HOT (2), rz >= Warm Z = WARM (1), else COLD (0).
4. A trend EMA defines directional bias: close above = up, below = down.
5. A separate reclaim EMA times the entry: a confirmed close-cross of it in the bias direction inside a HOT (or optionally WARM) regime is the trigger.
6. A cooldown, bar-close confirmation and a position-lock gate the final signal so it never repaints intrabar and never stacks the same side.
🔶 SIGNAL LOGIC
- Buy: in-session AND regime tradable AND trend direction up AND close crosses over the reclaim EMA AND position not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: in-session AND regime tradable AND trend direction down AND close crosses under the reclaim EMA AND position not already short AND cooldown elapsed AND barstate.isconfirmed.
Only fires while the RVOL z-score regime is HOT (or WARM if "Trade Only When Hot" is off).
🔶 INPUTS
- RVOL group: Volume MA Length baseline for the relative-volume ratio (default 20).
- RVOL group: RVOL Z Window the ratio is z-scored over (default 50).
- RVOL group: Hot Z Threshold above which trading is enabled (default 1.0).
- RVOL group: Warm Z Threshold separating WARM from COLD (default 0.0).
- RVOL group: Trend EMA defining directional bias inside a hot regime (default 34).
- Signal Logic group: Entry Reclaim EMA whose close-cross times entries (default 9).
- Signal Logic group: Trade Only When Hot toggle and Cooldown Bars between signals (default 5).
- Filters group: optional session restriction with a configurable window (default off).
- Visual group: dashboard, 3-layer glow, heat background and buy/sell colors (dashboard default on).
🔶 ALERTS
RVH Buy, RVH Sell, RVH Any Signal, RVH Hot On, RVH Hot Off, RVH Warm, RVH Cold, RVH EMA Up, RVH EMA Down, RVH Trend Cross, RVH Hot Now, RVH Armed, RVH Webhook JSON.
🔶 LIMITATIONS
- Needs warm-up bars before the z-score window and trend EMA are fully populated.
- Volume-based, so it requires a real volume feed; on forex it falls back to broker tick-volume, which is a proxy only.
- COLD and WARM regimes intentionally suppress signals, so quiet markets produce few or no entries.
- Defaults are tuned for liquid instruments and intraday/swing timeframes; thin symbols may need a higher Volume MA Length.
- The regime classifies participation, not direction; bias still depends on the trend and reclaim EMAs.
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.
🔵Gain access to our powerful tools : kestutisbalciunas.com/tradingview/
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
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.
🔵Gain access to our powerful tools : kestutisbalciunas.com/tradingview/
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
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.