PROTECTED SOURCE SCRIPT

TR Volume Candles (Lite)

13
Volume candles for your trading pleasure.

What it does
A lightweight recreation of Traders Reality’s “vector candle” coloring. It repaints the price candles (body, wick, and border) based on relative volume and spread×volume so you can spot high-activity bars at a glance—without the overhead of pivots, sessions, zones, or request.security calls.

Logic (matches TR)
  • Compute the average of the previous 10 bars’ volume (current bar excluded).
  • Compute volSpread = (high − low) × volume, and compare to the highest volSpread of the previous 10 bars (current bar excluded).


Color rules:
  • Green / Red (highest priority): volume ≥ 2× 10-bar average or volSpread ≥ highest of prior 10.
  • Blue / Violet: volume ≥ 1.5× 10-bar average (and not already green/red).
  • Regular: none of the above.
  • Colors (defaults align with TR)
  • Bull candles: Green (2× / spread×vol), Blue (1.5×), otherwise Light Gray.
  • Bear candles: Red (2× / spread×vol), Violet (1.5×), otherwise Dark Gray.


Why it’s fast
No external libraries, no symbol overrides, no multi-timeframe requests—just native series math on the current chart.

Inputs
Colors only (keep TR defaults or customize). Thresholds and lookback are fixed to TR standards to ensure identical behavior.

Alerts
“Any Vector Candle,” plus individual alerts for Green, Red, Blue, and Purple. For confirmed signals, set alert to Once per bar close.

Notes
*Works on all timeframes.
*Candle width is unchanged (uniform, as in your screenshot).
*Heikin Ashi or other synthetic candle types will color based on those candles’ OHLC/volume; for strict equivalence, use standard candles.
*Volume is exchange-feed dependent; anomalies (splits/halts) can spike the logic temporarily.


Use cases
Quickly highlight expansion bars that often precede/confirm momentum. Combine with your trend tools (EMAs, VWAP, MavilimW) or Darvas/box structures for context.

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。