Bar Statistics - DELTA/OI/TOTAL/BUY/SELL/LONGS/SHORTSBar Statistics - Advanced Volume & Open Interest Analysis
Overview
The Bar Statistics indicator is a comprehensive analytical tool designed to provide traders with detailed insights into market microstructure through advanced volume analysis, open interest tracking, and market flow detection. This indicator transforms complex market data into easily digestible visual information, displaying six key metrics in customizable colored boxes that update in real-time.
Unlike traditional volume indicators that only show basic volume data, this indicator combines multiple data sources to reveal the underlying forces driving price movement, including volume delta calculations from lower timeframes, open interest changes, and estimated market positioning.
What Makes This Indicator Unique
1. Multi-Timeframe Volume Delta Precision
The indicator utilizes lower timeframe data (default 1-second) to calculate highly accurate volume delta measurements, providing much more precise buy/sell pressure analysis than standard timeframe-based calculations. This approach captures intraday volume dynamics that are often missed by conventional indicators.
2. Real-Time Updates
Unlike many indicators that only update on bar completion, this tool provides live updates for the developing candle, allowing traders to see evolving market conditions as they happen.
3. Market Flow Analysis
The unique "L/S" (Long/Short) metric combines open interest changes with price/volume direction to estimate net market positioning, helping identify when participants are accumulating or distributing positions.
4. Adaptive Visual Intensity
The gradient color system automatically adjusts based on historical context, making it easy to identify when current values are significant relative to recent market activity.
5. Complete Customization
Every aspect of the display can be customized, from the order of metrics to individual color schemes, allowing traders to adapt the tool to their specific analysis needs.
6.All In One Solution
6 Metrics in one indicator no more using 5 different indicators.
Core Features Explained
DELTA (Volume Delta)
What it shows: Net difference between aggressive buy volume and aggressive sell volume
Calculation: Uses lower timeframe data to determine whether each trade was initiated by buyers or sellers
Interpretation:
Positive values indicate aggressive buying pressure
Negative values indicate aggressive selling pressure
Magnitude indicates the strength of directional pressure
OI Δ (Open Interest Change)
What it shows: Change in open interest from the previous bar
Data source: Fetches open interest data using the "_OI" symbol suffix
Interpretation:
Positive values indicate new positions entering the market
Negative values indicate positions being closed
Combined with price direction, reveals market participant behavior
L/S (Net Long/Short Bias)
What it shows: Estimated net change in long vs short market positions
Calculation method: Combines open interest changes with price/volume direction using configurable logic
Scenarios analyzed:
New Longs: Rising OI + Rising Price/Volume = Long position accumulation
Liquidated Longs: Falling OI + Falling Price/Volume = Long position exits
New Shorts: Rising OI + Falling Price/Volume = Short position accumulation
Covered Shorts: Falling OI + Rising Price/Volume = Short position exits
Result: Net bias toward long (positive) or short (negative) market sentiment
TOTAL (Total Volume)
What it shows: Standard volume for the current bar
Purpose: Provides context for other metrics and baseline activity measurement
Enhanced display: Uses gradient intensity based on recent volume history
BUY (Estimated Buy Volume)
What it shows: Estimated aggressive buy volume
Calculation: (Total Volume + Delta) / 2
Use case: Helps quantify the actual buying pressure in monetary/contract terms
SELL (Estimated Sell Volume)
What it shows: Estimated aggressive sell volume
Calculation: (Total Volume - Delta) / 2
Use case: Helps quantify the actual selling pressure in monetary/contract terms
Configuration Options
Timeframe Settings
Custom Timeframe Toggle: Enable/disable custom lower timeframe selection
Timeframe Selection: Choose the precision level for volume delta calculations
Auto-Selection Logic: Automatically selects optimal timeframe based on chart timeframe
Net Positions Calculation
Direction Method: Choose between Price-based or Volume Delta-based direction determination
Value Method: Select between Open Interest Change or Volume for position size calculations
Display Customization
Row Order: Completely customize which metrics appear and in what order (6 positions available)
Color Schemes: Individual color selection for positive/negative values of each metric
Gradient Intensity: Configurable lookback period (10-200 bars) for relative intensity calculations
Visual Elements
Box Format: Clean, professional box display with clear labels
Color Coding: Intuitive color schemes with customizable transparency gradients
Real-time Updates: Live updating for developing candles with historical stability
How to Use This Indicator
For Day Traders
Volume Confirmation: Use DELTA to confirm breakout validity - strong directional moves should show corresponding volume delta
Entry Timing: Watch for volume delta divergences at key levels to time entries
Exit Signals: Monitor when aggressive volume shifts against your position
For Swing Traders
Market Flow: Focus on the L/S metric to identify when participants are accumulating or distributing
Open Interest Analysis: Use OI Δ to confirm whether moves are backed by new money or position adjustments
Trend Validation: Combine multiple metrics to validate trend strength and sustainability
For Scalpers
Real-time Edge: Utilize the live updates to see developing imbalances before bar completion
Quick Decision Making: Focus on DELTA and BUY/SELL for immediate market pressure assessment
Volume Profile: Use TOTAL volume context for optimal entry/exit sizing
Setup Recommendations
Futures Markets: Enable OI tracking and use Volume Delta direction method
Crypto Markets: Focus on DELTA and volume metrics; OI may not be available
Stock Markets: Use Price direction method with volume value calculations
High-Frequency Analysis: Set lower timeframe to 1S for maximum precision
Technical Implementation
Data Accuracy
Utilizes TradingView's ta.requestVolumeDelta() function for precise buy/sell classification
Implements error checking for data availability
Handles missing data gracefully with fallback calculations
Performance Optimization
Efficient array management with configurable lookback periods
Smart box creation and deletion to prevent memory issues
Optimized real-time updates without historical data corruption
Compatibility
Works on all timeframes from seconds to daily
Compatible with futures, forex, crypto, and stock markets
Automatically adjusts calculation methods based on available data
Risk Disclaimers
This indicator is designed for educational and analytical purposes. It provides statistical analysis of market data but does not guarantee trading success. Users should:
Combine with other forms of analysis
Practice proper risk management
Understand that past performance doesn't predict future results
Be aware that volume delta and open interest data quality varies by market and data provider
Conclusion
The Bar Statistics indicator represents a significant advancement in retail trader access to professional-grade market analysis tools. By combining multiple data sources into a single, customizable display, it provides the depth of analysis needed for comprehensive market microstructure understanding while maintaining the simplicity required for effective decision-making.
Индикаторы и стратегии
SMA Cross 5/50 with Trend Filter & Risk Management by JuggiDThe basic SMA (5/50) crossover strategy can be enhanced to improve profitability by adding filters and risk management. For example, a long entry is triggered only when the fast SMA (5) crosses above the slow SMA (50) **and** the price is above the SMA (200), ensuring trades align with the major trend. Similarly, a short entry requires the crossover confirmation plus the price staying below the SMA (200). To reduce false signals and protect capital, stop-loss and take-profit levels can be set automatically (e.g., 2% loss, 5% gain), while additional confirmation tools such as volume spikes, RSI above 50, or MACD momentum can be applied to validate stronger signals. This approach helps avoid whipsaws in sideways markets and allows trades to capture larger moves while minimizing downside risk.
Dynamic Levels: Mon + D/W/M/Y (O/H/L/C/Mid)Purpose!
This Pine Script plots key reference levels (Open,High,Low,Close,Mid) for Monday,Daily,Weekly, Monthly, and Yearly timeframes.
All levels update live while the bar is forming. ( intrabar updates).
USAGE
Add the script to Pine Editor on TradingView (desktop Web)
Save - Add to chart
On mobile app: Find it under indicators - My scripts.
Great for identifying key reaction zones (opens,mids,previous closes).
Strong Candle Detector (Candles Close UP/DOWN)The Strong Candle Detector highlights candles that close decisively above or below the previous candle’s range, which means the resting liquidity of the previous candle has been entirely absorbed.
How it works:
A candle is considered Bullish (UP) when its close is higher than the previous candle’s high.
A candle is considered Bearish (DOWN) when its close is lower than the previous candle’s low.
This tool helps traders:
Spot strong breakouts or breakdowns.
Know when a liquidity sweep of a previous candle's extremes has failed
Quickly identify potential momentum continuation or reversal points.
Improve chart clarity by emphasizing only significant candles.
⚠️ Note: This indicator does not provide buy/sell signals. It is meant as a visual aid to support your trading strategy.
Candle Suite PRO – Engulf + Pin + Regime Filters + Trigger//@version=5
indicator("Candle Suite PRO – Engulf + Pin + Regime Filters + Trigger", overlay=true, max_labels_count=500)
//===================== Inputs =====================
grpPtn = "Patterns"
useEngulf = input.bool(true, "Enable Engulfing", group=grpPtn)
usePin = input.bool(true, "Enable Pin Bar", group=grpPtn)
pinRatio = input.float(2.0, "PinBar shadow >= body ×", group=grpPtn, step=0.1, minval=1)
minBodyP = input.float(0.15, "Min Body% of Range (0~1)", group=grpPtn, step=0.01, minval=0, maxval=1)
coolBars = input.int(3, "Cooldown bars", group=grpPtn, minval=0)
grpReg = "Regime Filters"
useHTF = input.bool(true, "Use HTF EMA50 Filter", group=grpReg)
htfTF = input.timeframe("60", "HTF timeframe", group=grpReg) // 5m/15m → 60 권장
useADX = input.bool(true, "Use ADX Trend Filter", group=grpReg)
adxLen = input.int(14, "ADX Length", group=grpReg, minval=5)
adxMin = input.int(18, "ADX Min Threshold", group=grpReg, minval=5)
useVOL = input.bool(true, "Use Volume Filter (> SMA×k)",group=grpReg)
volMult = input.float(1.10, "k for Volume", group=grpReg, step=0.05)
emaPinchPc = input.float(0.15, "No-Trade if |EMA20-50| < %", group=grpReg, step=0.05)/100.0
maxDistATR = input.float(1.5, "No-Trade if |Close-EMA20| > ATR×", group=grpReg, step=0.1)
useVWAP = input.bool(true, "Require close above/below VWAP", group=grpReg)
//===================== Helpers ====================
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
atr14 = ta.atr(14)
vwap = ta.vwap(hlc3)
rng = high - low
body = math.abs(close - open)
upper = high - math.max(open, close)
lower = math.min(open, close) - low
bull = close > open
bear = close < open
bodyOK = rng > 0 ? (body / rng) >= minBodyP : false
//===================== Patterns ===================
prevOpen = open
prevClose = close
prevBull = prevClose > prevOpen
prevBear = prevClose < prevOpen
bullEngulf_raw = useEngulf and prevBear and bull and (open <= prevClose) and (close >= prevOpen) and bodyOK
bearEngulf_raw = useEngulf and prevBull and bear and (open >= prevClose) and (close <= prevOpen) and bodyOK
bullPin_raw = usePin and (lower >= pinRatio * body) and (upper <= body) and bodyOK // Hammer
bearPin_raw = usePin and (upper >= pinRatio * body) and (lower <= body) and bodyOK // Shooting Star
//================= Regime & No-trade ===============
// HTF trend (EMA50 on higher TF)
emaHTF50 = request.security(syminfo.tickerid, htfTF, ta.ema(close, 50))
htfLong = not useHTF or close > emaHTF50
htfShort = not useHTF or close < emaHTF50
// ADX (manual, version-safe)
len = adxLen
upMove = high - high
downMove = low - low
plusDM = (upMove > downMove and upMove > 0) ? upMove : 0.0
minusDM = (downMove > upMove and downMove > 0) ? downMove : 0.0
trur = ta.rma(ta.tr(true), len)
plusDI = 100 * ta.rma(plusDM, len) / trur
minusDI = 100 * ta.rma(minusDM, len) / trur
dx = 100 * math.abs(plusDI - minusDI) / math.max(plusDI + minusDI, 1e-10)
adxVal = ta.rma(dx, len)
trendOK = not useADX or adxVal >= adxMin
// Volume
volOK = not useVOL or (volume >= ta.sma(volume, 20) * volMult)
// Alignment & slope
slopeUp = ema20 > ema20
slopeDown = ema20 < ema20
alignLong = ema20 > ema50 and slopeUp
alignShort = ema20 < ema50 and slopeDown
// Chop / distance / VWAP
pinch = math.abs(ema20 - ema50) / close < emaPinchPc
tooFar = math.abs(close - ema20) / atr14 > maxDistATR
vwapOKL = not useVWAP or close > vwap
vwapOKS = not useVWAP or close < vwap
//================= Final Setups ====================
longSetup_raw = bullEngulf_raw or bullPin_raw
shortSetup_raw = bearEngulf_raw or bearPin_raw
longSetup = longSetup_raw and alignLong and htfLong and trendOK and volOK and not pinch and not tooFar and vwapOKL
shortSetup = shortSetup_raw and alignShort and htfShort and trendOK and volOK and not pinch and not tooFar and vwapOKS
// Trigger: 다음 봉이 전봉의 고/저 돌파 + 종가 확인
longTrig = longSetup and high > high and close > ema20
shortTrig = shortSetup and low < low and close < ema20
// Cooldown & final signals
var int lastLong = na
var int lastShort = na
canLong = na(lastLong) or (bar_index - lastLong > coolBars)
canShort = na(lastShort) or (bar_index - lastShort > coolBars)
finalLong = longTrig and canLong
finalShort = shortTrig and canShort
if finalLong
lastLong := bar_index
if finalShort
lastShort := bar_index
//==================== Plots ========================
plot(ema20, "EMA 20", color=color.new(color.orange, 0))
plot(ema50, "EMA 50", color=color.new(color.blue, 0))
plot(useVWAP ? vwap : na, "VWAP", color=color.new(color.purple, 0))
plotshape(finalLong, title="LONG ▶", style=shape.labelup, location=location.belowbar, text="Long▶", color=color.new(color.blue, 0), size=size.tiny)
plotshape(finalShort, title="SHORT ▶", style=shape.labeldown, location=location.abovebar, text="Short▶", color=color.new(color.red, 0), size=size.tiny)
// Alerts
alertcondition(finalLong, "LONG ▶", "Long trigger")
alertcondition(finalShort, "SHORT ▶", "Short trigger")
// 시각적 노트레이드 힌트
bgcolor(pinch ? color.new(color.gray, 92) : na)
σ-Based SL/TP (Long & Short). Statistical Volatility (Quant Upgrade of ATR)
Instead of ATR’s simple moving average, use standard deviation of returns (σ), realized volatility, or implied volatility (options data).
SL = kσ, TP = 2kσ (customizable).
Why better than ATR: more precise reflection of actual distribution tails, not just candle ranges.
Keyzone🔑 Keyzone Levels (KZ)
KZ3 (Light Green) → Short-term support zone
KZ8 (Dark Green) → Medium-term support / resistance zone
KZ21 (Orange) → Main decision zone, often used to confirm trend direction
KZ89 (Red) → Long-term boundary, defines strong support/resistance in Sideway markets
📌 Keyzone levels are dynamic zones that adjust as the market moves. They help identify bias (trend vs sideway) and setups such as Trap Reversal (TRS), Swing Reversal (SRS), and Snapback (SBS) in the Keyzone Master Framework.
Buy Signal 50-200 EMA & RSI25 (Alert)Buy signal generate when all given condition achieved Risk to reward ratio is 1:2 minimum
QQQ Ladder → Adjusted to Active Ticker (5s & 10s)This indicator allows you to a grid of QQQ levels directly on futures chart like NQ, MNQ, ES and MES, automatically adjusting for the spread between the displayed symbol and QQQ. This is particularly useful for traders who perform technical analysis on QQQ but execute trades on Futures.
Features:
Renders every 5 and 10 points steps of QQQ in your current chart.
The script adjusts these levels in real-time based on the current spread between QQQ and the displayed symbol!
Plots updated horizontal lines that move with the spread
Supports Multiple Tickers, ES1!, MES1!, NQ1!, MNQ1! SPY and SPX500USD.
NDX Ladder → Adjusted to Active Ticker (5s & 10s)This indicator allows you to a grid of NDX levels directly on the NQ! (E-mini NASDAQ 100 Futures) chart, automatically adjusting for the spread between NDX and NQ1!. This is particularly useful for traders who perform technical analysis on SPX but execute trades on NQ1!.
Features:
Renders every 5 and 10 points steps of the NDX in your current chart.
The script adjusts these levels in real-time based on the current spread between NDX and NQ / MNQ
Plots updated horizontal lines that move with the spread
KRX RS OverlayKRX RS Overlay (Manual, Pine v6) (한국어 설명 아래에)
What it does
Plots a Relative Strength (RS) line of the current symbol versus a selected Korean market index on the price chart (overlay). RS is computed as Close(symbol) / Close(benchmark) and rebased to 100 N bars ago for easy comparison. An SMA of RS is included for signal smoothing.
Benchmarks (manual selection only)
• KOSPI (KRX:KOSPI) — default
• KOSDAQ (KRX:KOSDAQ)
• KOSPI200 (KRX:KOSPI200)
• KOSDAQ150 (KRX:KOSDAQ150)
Inputs
• Benchmark: choose one of the four indices above (default: KOSPI)
• Rebase N bars ago to 100: sets the normalization point (e.g., 252 ≈ 1 trading year on daily)
• RS SMA length: smoothing period for the RS line
• Show 100 base line: toggle the reference line at 100
How to read
• RS rising → the symbol is outperforming the selected index.
• RS above RS-SMA and sloping up → strengthening leadership vs. the benchmark.
• RS crossing above RS-SMA → momentum-style confirmation (an alert is provided).
Tips
• Works on any timeframe; the benchmark is requested on the same timeframe.
• If the RS line scale conflicts with price, place the indicator on the Left scale (Chart Settings → Scales) or set the series to use the left axis.
Notes
• This script is manual only (no auto index detection).
• Educational use; not financial advice.
⸻
KRX RS 오버레이 (수동, Pine v6)
기능
현재 종목을 선택한 한국 지수와 비교한 상대강도(RS) 라인을 가격 차트 위(오버레이)에 표시합니다. RS는 종목 종가 / 지수 종가로 계산하며, 비교를 쉽게 하기 위해 N봉 전 = 100으로 리베이스합니다. 신호 완화를 위해 RS의 SMA도 함께 제공합니다.
벤치마크(수동 선택만 지원)
• KOSPI (KRX:KOSPI) — 기본값
• KOSDAQ (KRX:KOSDAQ)
• KOSPI200 (KRX:KOSPI200)
• KOSDAQ150 (KRX:KOSDAQ150)
입력값
• Benchmark: 위 4개 지수 중 선택(기본: KOSPI)
• Rebase N bars ago to 100: 리베이스 기준(일봉 252 ≈ 1년)
• RS SMA length: RS 스무딩 기간
• Show 100 base line: 100 기준선 표시 여부
해석 가이드
• RS 상승 → 선택 지수 대비 초과성과.
• RS가 RS-SMA 위 & 우상향 → 벤치마크 대비 리더십 강화.
• RS가 RS-SMA 상향 돌파 → 모멘텀 확인(알림 제공).
팁
• 모든 타임프레임에서 동작하며, 지수도 동일 타임프레임으로 요청됩니다.
• 가격 축과 스케일이 겹치면 왼쪽 스케일로 표시하도록 설정하세요(차트 설정 → Scales).
유의사항
• 자동 지수 판별 기능은 포함하지 않았습니다(수동 전용).
Ponzi-Star Index · Minimal (BTC · DXY + Volume + Market Cap)If we think of the U.S. Dollar Index as the speed of light,
market cap as the mass of a star,
and trading volume as the energy of cataclysmic change—
then can we imagine the market as a star:
entering during its expansion phase,
and exiting before its collapse?
(VIX Spread-BTC Cycle Timing Strategy)A multi-asset cycle timing strategy that constructs a 0-100 oscillator using the absolute 10Y-2Y U.S. Treasury yield spread multiplied by the inverse of VIX squared. It integrates BTC’s deviation from its 100-day MA and 10Y Treasury’s MA position as dual filters, with clear entry rules: enter bond markets when the oscillator exceeds 80 (hiking cycles) and enter BTC when it drops below 20 (easing cycles).
Multi Asset Position Size Calculator (Extended with Entry ModeMulti Asset Position Size Calculator (Extended with Entry Mode
Multi Asset Position Size Calculator Multi Asset Position Size Calculator (Extended with Entry Mode)_Mr_X
Triple Quad Frosty v4.5Triple Quad Frosty v4.5 is a Renko-friendly strategy that lets you trade from up to four signal sources per side. Orders are only placed when your chosen conditional filters (A/B/C) agree, giving you full control over when entries are valid. You decide how signals must line up — from simple single-source triggers to majority or full agreement across all four.
Renko-based, with customizable static stops, take profits, and trailing stops. Time/day filters, daily trade limits, and forced closures let you restrict trading to specific windows.
The HTF filters in Triple Quad Frosty v4.5 use a higher-timeframe Hull Moving Average (HMA) to confirm trend direction, while slope and distance settings on the local HMA help filter out weak or choppy setups. Longs only trigger when price is above the HTF HMA and meets slope/distance requirements, and shorts only when the opposite is true.
Color-coded labels mark each exit as a win or loss, with reversal trades labeled separately for clarity. Conditional bars plotted above and below the chart show when the A/B/C filters align on a long or short bias, giving clear visual confirmation of entry conditions. Stop loss and take profit levels are plotted directly on the chart with guide lines, so you can easily track active trade management in real time.
Relative Strength Comparison-Num_Den_inputsThis RSC chart lets you give inputs for both Numerator and Denominator
Ighodalo Gold - CRT (Candles are ranges theory)This indicator is designed to automatically identify and display CRT (Candles are Ranges Theory) Candles on your chart. It draws the high and low of the identified range and extends them until price breaks out, providing clear levels of support and resistance.
The Candles are Ranges Theory (CRT) concept was originally developed and shared by a trader named Romeotpt (Raid). All credit for the trading methodology goes to him. This indicator simply makes spotting these specific candles easier.
What is a CRT Candle & How Is It Used?
A CRT candle is a single candle that has both the highest high AND the lowest low over a user-defined period. It is identified by analysing a block of recent candles and finding the one candle that contains the entire price range of that block.
Once a CRT candle is formed, its high and low act as an accumulation range.
A break above or below this range is the manipulation phase.
A reclaim of the range (price closing back inside) signifies a potential distribution phase.
On higher timeframes, this sequence can be interpreted as:
Candle 1: Accumulation
Candle 2: Manipulation
Candle 3: Distribution
Reversal (Turtle Soup):
A sweep of the high or low, followed by a quick reclaim (price closing back inside the range), can signify a reversal. According to the theory’s originator, Romeo, this reversal pattern is called “turtle soup.”
After a bearish reversal at the high, the target becomes the CRT low.
After a bullish reversal at the low, the target becomes the CRT high.
How to Use This Indicator
The indicator is flexible and can be adapted to your trading style. The most important settings are:
Max Lookback Period: Number of past candles ("n") the indicator checks within to find a CRT.
CRT Timeframe:
Select a timeframe (e.g., 1H): The indicator will look at the higher timeframe you selected and plot the most recent CRT range from that timeframe onto your current chart. This is useful for multi-timeframe analysis.
Enable Overlapping CRTs:
False (unchecked): Shows only one active CRT range at a time. The indicator won’t look for a new one until the current range is broken.
True (checked): Constantly searches for and displays all CRT ranges it finds, allowing multiple ranges to appear on the chart simultaneously.
Disclaimer & Notes
-This is a visualisation tool and not a standalone trading signal. Always use it alongside your own analysis and risk management strategy.
-All credit for the "Candles are Ranges Theory" (CRT) concept goes to its creator, Romeotpt (Raid).
"On the journey to the opposite side of the range, price often provides multiple turtle soup entry opportunities. Follow their footprints." — Raid, 2025
Volume-Price Value ChartPrice and volume are the two most important part of price movement. So, value which is product of the two is very critical and this can be considered as the only leading indicator.