OPEN-SOURCE SCRIPT
Candle Body Volatility Histogram

This is a statistical analysis tool for TradingView designed to visualize the volatility of candle bodies. Unlike standard indicators that focus on price levels, this one measures the "thickness" of the candle ($|Open - Close|$) and determines how significant a move is compared to recent history.Here is the overview of the Candle Body Volatility Histogram:1. Core Logic: Statistical Body AnalysisThe script applies the concept of Standard Deviation (Sigma)—commonly used in Bollinger Bands—directly to the size of the candle bodies.Body Size ($|Open - Close|$): It ignores the wicks and calculates the pure strength of the close.Average Body (SMA): The yellow line represents the "normal" size of a candle over the lookback period (default: 20).Sigma Levels (1σ, 2σ, 3σ): These lines act as thresholds to identify statistically unusual price action.2. Visual ComponentsThe indicator appears in a separate sub-window with the following elements:ElementDescriptionHistogram (Bars)Color-coded based on the candle type: Lime for Bullish, Red for Bearish.Yellow LineThe Average Body Size. If bars are below this, the market is quiet.Sigma 1, 2, 3 LinesBlue-toned lines showing increasing levels of volatility.Blue Background FillHighlights the area between Sigma 2 and Sigma 3, marking the "Extreme Volatility Zone."
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.