OPEN-SOURCE SCRIPT
Cập nhật Positional Trading Indicator

What it shows:
1. Vol Val (Volume Value)
A liquidity filter. Computes the volume-weighted average price (VWAP) of the last 7 bars multiplied by total volume over the same period, expressed in Indian Rupee Crores. Colour-coded for quick reads:
🔴 Red — below ₹5 Cr (illiquid, avoid)
🟡 Yellow — ₹5–20 Cr (moderate liquidity)
🟢 Green — above ₹20 Cr (sufficient liquidity for positional sizing)
2. Trend (Pivot Structure)
Classifies the current trend using confirmed Pivot Highs and Lows (default 5/5 left-right, adjustable). Compares the last two confirmed pivot highs and lows to determine market structure:
🟢 Positive — Higher High + Higher Low (uptrend structure)
🟡 Neutral — Mixed structure (consolidation or transition)
🔴 Negative — Lower High + Lower Low (downtrend structure)
3. Mansfield Relative Strength
Plots the stock's performance relative to a benchmark index (default: NSE:CNX500) as a ratio, smoothed by a 52-week SMA — adapted from the classic Mansfield RS methodology used in Stage Analysis. Indicates whether the stock is outperforming or underperforming the broader market:
🟢 RS Positive — Stock ratio is above its 52W MA (outperforming)
🔴 RS Negative — Stock ratio is at or below its 52W MA (underperforming)
4. Demand Zones
Automatically identifies and draws the most recent active demand zone on the chart. A zone is defined by a minimum of 3 touch points (wick entries or closes inside the zone), with at least 2 bars between consecutive touches. Zone width is ATR-based (default 0.5× ATR), anchored at the low of the zone. Overlapping zones are merged into a single clean box. Zones are invalidated and removed once price closes below them.
5. Pivot Level Lines
Draws dashed horizontal lines from the most recent confirmed Pivot High (light blue) and Pivot Low (red), extending to the right — giving you instant visual reference for key structural levels.
Inputs & Customisation:
All parameters are adjustable — Vol Val lookback, liquidity thresholds, pivot left/right lengths, ATR multiplier, demand zone lookback, minimum touches, gap between touches, RS benchmark symbol, and RS MA length.
1. Vol Val (Volume Value)
A liquidity filter. Computes the volume-weighted average price (VWAP) of the last 7 bars multiplied by total volume over the same period, expressed in Indian Rupee Crores. Colour-coded for quick reads:
🔴 Red — below ₹5 Cr (illiquid, avoid)
🟡 Yellow — ₹5–20 Cr (moderate liquidity)
🟢 Green — above ₹20 Cr (sufficient liquidity for positional sizing)
2. Trend (Pivot Structure)
Classifies the current trend using confirmed Pivot Highs and Lows (default 5/5 left-right, adjustable). Compares the last two confirmed pivot highs and lows to determine market structure:
🟢 Positive — Higher High + Higher Low (uptrend structure)
🟡 Neutral — Mixed structure (consolidation or transition)
🔴 Negative — Lower High + Lower Low (downtrend structure)
3. Mansfield Relative Strength
Plots the stock's performance relative to a benchmark index (default: NSE:CNX500) as a ratio, smoothed by a 52-week SMA — adapted from the classic Mansfield RS methodology used in Stage Analysis. Indicates whether the stock is outperforming or underperforming the broader market:
🟢 RS Positive — Stock ratio is above its 52W MA (outperforming)
🔴 RS Negative — Stock ratio is at or below its 52W MA (underperforming)
4. Demand Zones
Automatically identifies and draws the most recent active demand zone on the chart. A zone is defined by a minimum of 3 touch points (wick entries or closes inside the zone), with at least 2 bars between consecutive touches. Zone width is ATR-based (default 0.5× ATR), anchored at the low of the zone. Overlapping zones are merged into a single clean box. Zones are invalidated and removed once price closes below them.
5. Pivot Level Lines
Draws dashed horizontal lines from the most recent confirmed Pivot High (light blue) and Pivot Low (red), extending to the right — giving you instant visual reference for key structural levels.
Inputs & Customisation:
All parameters are adjustable — Vol Val lookback, liquidity thresholds, pivot left/right lengths, ATR multiplier, demand zone lookback, minimum touches, gap between touches, RS benchmark symbol, and RS MA length.
Phát hành các Ghi chú
Fixed Some Timeframes on Mansfield RS and Pivot trendsMã 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.