Volume Profile Right

■ Calculation Logic
1. Price Binning System
The indicator divides the highest-to-lowest price range into user-defined boxes, detects candle volume entering each range, and allocates it based on buy/sell conditions.
2. Distinct Buy/Sell Volume Separation
Buy Volume = close ≥ open, Sell Volume = close < open, allowing each price range to independently accumulate buy and sell volume.
3. Dual-Side Volume Profile Construction
Each range compares its volume to the global max, then calculates:
buyBoxWidth = (buyVol / maxVol) * profileWidth,
sellBoxWidth = (sellVol / maxVol) * profileWidth,
creating a balanced left-side buy profile and right-side sell profile.
4. Text-Enhanced Visual Boxes
Each range displays background color, border, average price, K-scaled volume text, adjustable transparency, and alignment for more intuitive volume distribution analysis.
■ User Inputs (Accurate, Non-Exaggerated Descriptions)
Analysis Period (lookback): Controls how many historical bars are analyzed.
Number of Price Ranges (boxes): Defines how finely the price span is segmented.
Profile Width: Sets maximum horizontal width of the profile.
Box Height: Adjusts the vertical thickness of each volume box.
Font Size: Controls text size for displayed volumes.
Transparency: Adjusts box background opacity.
Buy/Sell Color Groups: Sets background and border colors for buy and sell boxes.
Background Color Settings: Adjusts global chart background and profile readability.
■ Repaint Behavior
The indicator analyzes only completed bars within the lookback period, uses no future data, and does not modify historical values; therefore, it does not repaint.
Real-time updates occur only because calculations execute on the latest bar via barstate.islast, which is normal behavior.
■ Purpose
Designed to reveal relative buy/sell volume distribution by price, highlight zones of concentrated participation, detect volume imbalances, and provide structural context for potential support/resistance—not to predict price or generate signals.
■ Notes
Box width reflects relative—not absolute—volume; buy/sell classification uses open/close comparison and may not perfectly represent order-flow nature; best used alongside other tools for complete analysis.
สคริปต์แบบเฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้งานที่ผู้เขียนอนุมัตเท่านั้นจึงจะสามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องขอและได้รับอนุญาตก่อนใช้งาน ซึ่งโดยทั่วไปจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม โปรดทำตามคำแนะนำของผู้เขียนด้านล่าง หรือติดต่อ c9indicator โดยตรง
TradingView ไม่แนะนำให้จ่ายเงินหรือใช้สคริปต์ เว้นแต่คุณจะเชื่อถือผู้เขียนและเข้าใจวิธีการทำงานของสคริปต์นั้นอย่างถ่องแท้ คุณยังสามารถหาทางเลือกแบบโอเพนซอร์สฟรีได้ใน สคริปต์ชุมชนของเรา
คำแนะนำของผู้เขียน
คำจำกัดสิทธิ์ความรับผิดชอบ
สคริปต์แบบเฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้งานที่ผู้เขียนอนุมัตเท่านั้นจึงจะสามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องขอและได้รับอนุญาตก่อนใช้งาน ซึ่งโดยทั่วไปจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม โปรดทำตามคำแนะนำของผู้เขียนด้านล่าง หรือติดต่อ c9indicator โดยตรง
TradingView ไม่แนะนำให้จ่ายเงินหรือใช้สคริปต์ เว้นแต่คุณจะเชื่อถือผู้เขียนและเข้าใจวิธีการทำงานของสคริปต์นั้นอย่างถ่องแท้ คุณยังสามารถหาทางเลือกแบบโอเพนซอร์สฟรีได้ใน สคริปต์ชุมชนของเรา