Volume Surge Detector[SpeculationLab]Volume Surge Detector
This tool is especially useful for spotting early signs of breakouts, news-driven spikes, or institutional activity that are often preceded by abnormal surges in volume.
For better chart readability, the volume bar colors are based on TradingView’s original Volume indicator, while all other code is fully original by Speculation Lab.
You can customize both the SMA line and the volume bar colors to fit your style.
The logic compares the current volume against its SMA (default length: 14, fully adjustable).
The script comes with two surge levels:
Surge Level 1 (default = 5) → When volume is more than 5× the SMA, the bar turns aqua.
Surge Level 2 (default = 10) → When volume is more than 10× the SMA, the bar turns yellow.
It also includes built-in alerts, so you’ll be notified instantly whenever a surge is detected.
This makes it easier to spot potential breakout moves or large market participation in real time.
Disclaimer: This script is for educational purposes only. It does not provide financial advice.
这是一个用于探测 成交量爆发 的指标。
为了图表美观,成交量柱的颜色借鉴了 TradingView 原始 Volume 指标,其余代码均为 Speculation Lab 原创。
用户可以自由调整成交量柱和其对应的 SMA 均线的颜色。
指标通过对比成交量和其 SMA(默认长度为14,可自定义长度和颜色)的比例来检测放量。
默认设置了两个放量级别:
Surge Level 1(默认=5):当成交量超过均量的 5 倍时,量柱变为水蓝色。
Surge Level 2(默认=10):当成交量超过均量的 10 倍时,量柱变为黄色。
脚本还设置了 内置警报功能,方便交易者在出现放量时实时收到通知。
成交量
Advanced Full VSA Analyzer with StrengthThis script provides a full Volume Spread Analysis (VSA) toolkit to detect and label strength and weakness signals on the chart based on candle spread, volume, and close position.
It identifies key VSA patterns such as:
No Demand / No Supply
Upthrust
Stopping Volume
Shakeout
Test (Successful and Failed)
Effort to Rise / Fall
Buying / Selling Climax
Spring, and more...
🔍 Features:
Detects VSA signals with contextual labels (e.g. "Upthrust – Weak", "Effort to Rise – Strong")
Compares current candle volume/spread/close to previous candles
Includes volume moving average & deviation bands
Filters out repeated signals to reduce chart clutter
Fully customizable parameters
Ideal for traders using Wyckoff Method, Smart Money Concepts, or Volume Price Analysis.
Imbalance Scanner [Afnan]Identify the most aggressive candles on any chart—instantly or historically—and act before the crowd notices.
🔥 What It Does
Four-tier detection system: 🟡 Low → 🟠 Mild → 🔴 Explosive → 💥 Super Explosive
Smart filtering: Detects abnormal candle bodies and ranges that signal market imbalances
Volume confirmation: Optional filter ensures moves are backed by institutional-level activity
Directional control: Choose All, Bullish, or Bearish candles to match your trading bias
Pine Scanner optimized: Scan entire watchlists in real-time or historically.
Clean interface: Minimal emoji labels with background highlighting—no chart clutter
⚡ Quick Setup
1. Load & Configure: Add to chart and open indicator settings
2. Set Detection Level: Choose minimum imbalance strength (Low/Mild/Explosive/Super)
3. Optional Volume Filter: Enable for higher-quality signals with volume confirmation
4. Pine Scanner Setup: Set "Days Back" (0 for live scanning, >0 for historical analysis)
5. Create Alerts: Pre-built alert conditions for each explosive level
🎯 Primary Use Cases
Smart Money Detection: Spot where big players are active through explosive price movements
Market Inefficiencies: Find supply/demand imbalances as they develop
Breakout Confirmation: Validate genuine breakouts using explosive candle analysis
Identify momentum acceleration points for optimal timing
📊 Pine Scanner Ready
Fully compatible with TradingView's Pine Scanner for real-time watchlist monitoring and historical analysis.
💼 Professional Edge
Built by @AfnanTAjuddin for active traders who need reliable, fast imbalance detection across any market or timeframe. Perfect for day trading, swing trading, and institutional activity tracking.
成交量分布与行为分析(VP)# 📊 成交量分布与价格行为分析指标使用说明
## 🌟 指标概述
**成交量分布与价格行为分析**是一个专业的TradingView指标,结合了传统的成交量分布分析(Volume Profile)和现代价格行为技术,为交易者提供全面的市场分析工具。
### ✨ 核心功能
- 📈 **成交量分布分析** - 显示特定价格区间的成交量集中度
- 🎯 **价格行为识别** - 智能识别关键价格水平和市场行为
- 📊 **情绪分布分析** - 展示买卖双方在不同价格的力量对比
- 🔄 **支撑阻力转换** - 自动检测支撑阻力的转换
- 📋 **专业统计信息** - 提供详细的市场数据统计
---
## 🛠️ 功能模块详解
### 1. 📊 成交量与情绪分布
#### 成交量分布
- **用途**: 显示在特定价格水平的成交量密度
- **解读**:
- 🟢 **绿色条形** = 上涨成交量(买盘主导)
- 🔴 **红色条形** = 下跌成交量(卖盘主导)
- 📏 **条形长度** = 成交量大小
#### 价值区域 (Value Area)
- **💎 价值区域上涨/下跌**: 68%成交量集中的区域
- **📈 VAH (Value Area High)**: 价值区域上边界
- **📉 VAL (Value Area Low)**: 价值区域下边界
- **🎯 POC (Point of Control)**: 成交量最大的价格水平
#### 情绪分布
- **🐂 看涨情绪**: 买盘力量占优势的价格区域
- **🐻 看跌情绪**: 卖盘力量占优势的价格区域
#### 供需区域
- **🔻 供应区域**: 卖压集中的低成交量区域
- **🔺 需求区域**: 买盘集中的低成交量区域
### 2. 🎯 价格行为分析
#### 关键价格提醒
- **🎯 POC附近**: 价格接近控制点时显示橙色圆点
- **⚡ VAH测试**: 价格测试价值区域高点时显示红色三角
- **🔥 VAL测试**: 价格测试价值区域低点时显示绿色三角
#### 成交量突破信号
- **🚀 突破确认**: 成交量异常放大时K线边框高亮
- **颜色含义**:
- 🟢 **绿色边框** = 上涨突破
- 🔴 **红色边框** = 下跌突破
#### 支撑阻力转换
- **🔄 阻力转支撑**: 突破VAH后显示蓝色虚线
- **🔄 支撑转阻力**: 跌破VAL后显示紫色虚线
### 3. 📊 成交量直方图
- **📈 绿色柱状**: 上涨K线的成交量
- **📉 红色柱状**: 下跌K线的成交量
- **📊 黄色线条**: 成交量移动平均线
- **🔄 翻转方向**: 可选择向上或向下显示
- **📍 位置控制**: 可放置在K线图上方或下方
---
## ⚙️ 参数设置指南
### 📊 成交量与情绪分布
| 参数 | 说明 | 推荐设置 |
|------|------|----------|
| **成交量分布** | 启用/禁用主要功能 | ✅ 开启 |
| **情绪分布** | 显示买卖情绪对比 | ✅ 开启 |
| **供需区域** | 显示供需失衡区域 | ✅ 开启 |
| **价值区域 (%)** | 成交量集中度 | 68% (默认) |
| **分布行数** | 价格精度 | 100行 |
| **分布宽度** | 显示宽度 | 31% |
| **回看长度** | 分析K线数量 | 360根 |
### 🎯 价格行为分析
| 参数 | 说明 | 建议设置 |
|------|------|----------|
| **关键价格提醒** | POC/VAH/VAL提醒 | ✅ 开启 |
| **POC敏感度** | POC提醒敏感度 | 0.2% |
| **VAH/VAL敏感度** | 边界测试敏感度 | 0.3% |
| **成交量突破信号** | 大成交量提醒 | ✅ 开启 |
| **成交量突破倍数** | 突破判定倍数 | 1.5倍 |
| **支撑阻力转换** | S/R转换线条 | ✅ 开启 |
| **显示风格** | 视觉强度 | 标准 |
### 📊 成交量直方图
| 参数 | 说明 | 建议 |
|------|------|------|
| **成交量直方图** | 启用直方图 | ✅ 开启 |
| **成交量MA** | 移动平均线 | ✅ 开启,21周期 |
| **位置** | 显示位置 | 顶部 |
| **翻转方向** | 方向控制 | ❌ 关闭 |
| **高度** | 显示高度 | 默认 |
| **垂直偏移** | 位置微调 | 1 |
---
## 📈 实战交易策略
### 🎯 策略一:POC回归交易
**设置要求**:
- ✅ 开启价格行为分析
- 🎯 POC敏感度: 0.2%
- 📊 成交量突破: 1.5倍
**交易信号**:
1. **🎯 橙色圆点出现** → 价格接近POC
2. **📊 成交量确认** → 等待成交量放大
3. **🚀 突破信号** → K线边框高亮时入场
**风险管理**:
- 止损:VAH/VAL边界
- 止盈:对侧价值区域边界
### 🔄 策略二:支撑阻力转换
**设置要求**:
- ✅ 开启支撑阻力转换
- 📏 线条长度: 5-10根K线
- ⚡ VAH/VAL敏感度: 0.3%
**交易信号**:
1. **🔵 蓝色虚线** → 阻力转支撑,看涨
2. **🟣 紫色虚线** → 支撑转阻力,看跌
3. **📊 成交量确认** → 配合大成交量
**适用市场**:
- 趋势行情
- 突破行情
- 区间震荡末期
### 📊 策略三:价值区域交易
**设置要求**:
- 💎 价值区域: 68%
- 📊 分布统计: 开启
- 🎨 显示风格: 标准
**交易逻辑**:
1. **价值区域内** → 区间交易策略
2. **价值区域上方** → 强势追多
3. **价值区域下方** → 弱势做空
4. **VAH/VAL测试** → 反弹/回调机会
---
## 🎨 显示风格选择
### 🔍 简约风格
- **适用**: 经验丰富的交易者
- **特点**: 提示非常低调,不影响图表阅读
- **推荐**: 专业交易员
### 📊 标准风格
- **适用**: 大多数交易者
- **特点**: 平衡的视觉效果,信息清晰
- **推荐**: 日常交易使用
### 🎯 醒目风格
- **适用**: 学习阶段的交易者
- **特点**: 信号明显,容易识别
- **推荐**: 新手交易者
---
## 🚨 警报设置
### 自动警报功能
- **🎯 POC穿越警报**: 价格突破控制点
- **📈 VAH突破警报**: 价格突破价值区域高点
- **📉 VAL突破警报**: 价格跌破价值区域低点
- **📊 高成交量警报**: 检测到异常成交量
- **🚀 成交量突破警报**: 确认突破信号
### 警报设置建议
1. 启用**POC穿越警报**用于关键点位提醒
2. 启用**成交量突破警报**用于入场确认
3. 根据交易风格选择性启用其他警报
---
## 📋 统计信息解读
### 右上角统计表格
| 项目 | 含义 | 用途 |
|------|------|------|
| **控制点** | 成交量最大的价格 | 关键支撑/阻力位 |
| **价值区域高点/低点** | 68%成交量边界 | 正常波动范围 |
| **总成交量** | 分析期间总成交量 | 市场活跃度 |
| **平均成交量/K线** | 平均K线成交量 | 成交量基准 |
| **价格行为** | 当前市场状态 | 实时分析结果 |
### 价格行为状态说明
| 状态 | 含义 | 操作建议 |
|------|------|----------|
| **🚀突破** | 成交量突破中 | 考虑追涨/追跌 |
| **🎯POC** | 接近控制点 | 关注反转机会 |
| **⚡VAH** | 测试价值区域高点 | 观察突破/回落 |
| **🔥VAL** | 测试价值区域低点 | 观察反弹/破位 |
| **↗上方** | 价值区域上方 | 强势市场 |
| **↘下方** | 价值区域下方 | 弱势市场 |
| **📊区域内** | 价值区域内 | 区间震荡 |
---
## 💡 使用技巧
### ✅ 最佳实践
1. **📊 多时间框架分析**:
- 高时间框架确定趋势
- 低时间框架寻找入场点
2. **🎯 关键水平确认**:
- POC作为主要支撑/阻力
- VAH/VAL作为次要关键位
3. **📈 成交量确认**:
- 突破必须配合成交量放大
- 低成交量突破谨慎对待
4. **🔄 动态调整**:
- 根据市场环境调整敏感度
- 趋势市场降低敏感度
- 震荡市场提高敏感度
### ❌ 常见误区
1. **过度依赖单一信号**: 需要多重确认
2. **忽略大趋势**: VP分析要结合趋势方向
3. **频繁调整参数**: 保持参数稳定性
4. **忽略风险管理**: 设置合理止损
---
## 🔧 故障排除
### 常见问题
**Q: 价格行为提示不显示?**
A: 检查以下设置:
- ✅ 确认"启用价格行为分析"已开启
- 🎨 调整"显示风格"为"醒目"
- 📊 降低敏感度设置
**Q: 成交量分布显示不完整?**
A: 调整以下参数:
- 📏 增加"回看长度"
- 📊 调整"分布行数"
- 📈 检查数据源
**Q: 警报过于频繁?**
A: 优化警报设置:
- 🎯 提高敏感度阈值
- 📊 增加成交量突破倍数
- ⏰ 选择关键警报类型
---
## 📞 技术支持
如有其他问题,请参考TradingView帮助文档或联系技术支持团队。
---
*💡 提示:该指标最适合用于股票、外汇、加密货币等具有充足成交量的市场。建议在使用前先在模拟环境中熟悉各项功能。*
# Volume Profile & Price Action Analysis Indicator
## Overview
This is a comprehensive **Volume Profile (VP)** indicator with advanced **Price Action Analysis** features, designed for professional trading on TradingView. It combines traditional volume profile analysis with sophisticated price behavior detection to provide traders with deeper market insights.
## 🎯 Key Features
### 📊 Volume Profile Analysis
- **Volume Distribution**: Visual representation of trading activity at different price levels
- **Point of Control (POC)**: Identifies the price level with highest volume
- **Value Area**: Highlights the price range containing 68% (customizable) of total volume
- **Sentiment Profile**: Shows bullish vs bearish sentiment at each price level
- **Supply & Demand Zones**: Identifies low-volume areas indicating potential breakout zones
### 🎯 Advanced Price Action Analysis
- **Key Price Level Alerts**: Smart detection when price approaches critical levels
- **Volume Breakout Signals**: Identifies significant volume spikes with visual confirmation
- **Support/Resistance Conversion**: Tracks when key levels flip their role
- **Real-time Price Behavior Status**: Live updates in statistics table
### 📈 Volume Histogram
- **Enhanced Volume Bars**: Visual volume representation with customizable placement
- **Volume Moving Average**: Overlay MA on volume for trend analysis
- **Flip Direction**: Option to invert histogram direction
- **Adjustable Height & Offset**: Full customization of visual appearance
## 🛠️ Configuration Guide
### Volume Profile Settings
| Parameter | Description | Default | Range |
|-----------|-------------|---------|--------|
| **Volume Profile** | Enable/disable main volume profile | ✓ Enabled | - |
| **Up Volume Color** | Color for bullish volume bars | Gray-Blue | Custom |
| **Down Volume Color** | Color for bearish volume bars | Gray | Custom |
| **Value Area %** | Percentage of volume for value area | 68% | 0-100% |
| **Profile Rows** | Resolution of volume profile | 100 | 10-150 |
| **Profile Width** | Width of volume profile bars | 31% | 0-250% |
### Price Action Analysis Settings
| Parameter | Description | Default | Range |
|-----------|-------------|---------|--------|
| **Enable Price Action** | Master switch for price analysis | ✓ Enabled | - |
| **Key Price Alerts** | POC/VAH/VAL proximity detection | ✓ Enabled | - |
| **POC Sensitivity** | Distance threshold for POC alerts | 0.2% | 0.1-1.0% |
| **VAH/VAL Sensitivity** | Distance threshold for value area alerts | 0.3% | 0.1-1.0% |
| **Volume Breakout Signals** | Large volume detection | ✓ Enabled | - |
| **Volume Threshold** | Multiplier for breakout detection | 1.5x | 1.2-3.0x |
| **Display Style** | Visual intensity of signals | Standard | Simple/Standard/Bold |
### Volume Histogram Settings
| Parameter | Description | Default | Range |
|-----------|-------------|---------|--------|
| **Volume Histogram** | Enable volume bars | ✓ Enabled | - |
| **Placement** | Position relative to price | Top | Top/Bottom |
| **Flip Direction** | Invert histogram direction | ✗ Disabled | - |
| **Height** | Size of volume bars | 8/10 | 1-10 |
| **Vertical Offset** | Position adjustment | 1 | -20 to 20 |
## 📋 How to Use
### 1. Basic Setup
1. Add the indicator to your chart
2. Adjust the **Lookback Length** (default: 360 bars) for your analysis period
3. Set **Profile Placement** (Right or Left side)
4. Configure colors to match your chart theme
### 2. Volume Profile Analysis
- **High Volume Areas** (thick bars) = Consolidation/Value zones
- **Low Volume Areas** (thin bars) = Potential breakout zones
- **POC Line** (red) = Strongest support/resistance level
- **Value Area** (highlighted) = Fair value trading range
### 3. Price Action Signals
#### Visual Indicators
- **🟡 Small Dots** = Price near POC (potential reversal zone)
- **🔺 Red Triangle** = Price testing Value Area High
- **🔻 Green Triangle** = Price testing Value Area Low
- **📊 Highlighted Candles** = Volume breakout confirmation
- **--- Dashed Lines** = Support/Resistance conversion
#### Statistics Table
Monitor real-time price behavior status:
- **🚀 Breakout** = Volume surge detected
- **🎯 POC** = Price near Point of Control
- **⚡ VAH** = Testing Value Area High
- **🔥 VAL** = Testing Value Area Low
- **↗ Above** = Price above value area
- **↘ Below** = Price below value area
### 4. Trading Applications
#### Entry Signals
- **Volume Breakout** + **POC Touch** = High probability setup
- **VAH/VAL Test** + **Volume Confirmation** = Reversal opportunity
- **Supply/Demand Zone** + **Price Action** = Breakout trade
#### Risk Management
- Use **Value Area** boundaries as dynamic support/resistance
- **POC** often acts as strong magnetic level
- **Low Volume Zones** may indicate stop-loss placement areas
#### Trend Analysis
- **Price Above Value Area** = Bullish bias
- **Price Below Value Area** = Bearish bias
- **Price Within Value Area** = Consolidation/ranging market
## ⚠️ Important Notes
### Performance Optimization
- Indicator processes multiple timeframes automatically
- **Data Source** shown in stats table (1S/5S/1min/5min etc.)
- Adjust **Profile Rows** if performance issues occur
### Best Practices
1. **Combine with Price Action**: Don't rely solely on volume profile
2. **Adjust Sensitivity**: Fine-tune alert thresholds for your timeframe
3. **Monitor Statistics**: Keep an eye on the real-time status table
4. **Use Multiple Timeframes**: Confirm signals across timeframes
### Alerts Setup
The indicator includes built-in alerts for:
- POC crossovers
- Value Area High/Low breaks
- Volume spike detection
- Significant volume increases
## 🎨 Customization Tips
### Professional Look
- Set **Display Style** to "Simple" for clean charts
- Use **muted colors** for volume profile
- Enable **Value Area Background** for clear visualization
### Active Trading
- Set **Display Style** to "Bold" for clear signals
- Lower **sensitivity thresholds** for more frequent alerts
- Enable **Volume Histogram** for quick volume assessment
### Multi-Timeframe Analysis
- Use **Visible Range** for dynamic analysis
- Adjust **Lookback Length** based on your trading style
- Monitor **Data Source** to understand calculation basis
## 📊 Understanding the Output
### Volume Profile Interpretation
- **Wide profiles** = Consolidation periods
- **Narrow profiles** = Trending periods
- **Split profiles** = Double distribution (support/resistance)
### Price Action Signals
- **Cluster of signals** = High probability zone
- **Isolated signals** = Lower confidence
- **Signal + Volume** = Highest probability setups
---
**Disclaimer**: This indicator is for educational purposes. Always perform your own analysis and risk management before making trading decisions.
Open Interest Screener (Fixed Zones)📌 Purpose
This indicator scans Open Interest (OI) changes across selected exchanges and highlights significant spikes or drops directly on the chart using dynamic shaded zones.
It is designed to help traders detect unusual market positioning changes that may precede volatility events.
🧠 How It Works
1. Data Sources
Supports multiple exchanges: BitMEX USD, BitMEX USDT, Kraken USD (toggle on/off in settings).
Automatically adapts symbol prefix based on the chart’s base asset.
2. Spike / Drop Detection
OI % Change is calculated over a configurable lookback (Bars to look back).
Spike Up: OI increases by more than Threshold %.
Spike Down: OI decreases by more than Threshold %.
3. Dynamic Zones
When a spike occurs, a green zone (increase) or red zone (decrease) is drawn on the chart.
Zone height is dynamic, based on price high/low ± 5%, preventing chart distortion.
Minimum spacing (Zone Spacing) prevents clustering.
📈 How to Use
Green Zones: Large OI increase can signal fresh positioning (possible breakout setups).
Red Zones: Large OI decrease can signal liquidation events or position unwinds.
Combine with price action, funding rates, or volatility measures for higher confidence.
Recommended Timeframes: Works best on 15m, 1h, 4h.
Markets: Crypto derivatives (OI data available).
⚙️ Inputs
Bars to Look Back
OI % Change Threshold
Zone Width
Exchange toggles (BitMEX USD/USDT, Kraken USD)
⚠️ Disclaimer
This script is for educational purposes only and does not constitute financial advice.
Always test thoroughly before live trading.
Volume Scanner (Spikes & Drops) [Context]📌 Purpose
This indicator detects significant volume spikes or drops and optionally filters them by price context (local highs/lows).
It helps identify potential breakout or exhaustion points with improved signal quality compared to raw volume alerts.
🧠 How It Works
1. Volume Spike / Drop Detection
SMA Volume over N bars is calculated as baseline.
Volume Spike: Volume > SMA × Spike Multiplier (default 1.5×).
Volume Drop: Volume < SMA × Drop Multiplier (default 0.5×).
2. Context Filter (optional)
When Use Context = ON:
Bullish Context: Volume spike at/near local price high (last Lookback bars).
Bearish Context: Volume drop at/near local price low (last Lookback bars).
3. Signal Gap
Minimum spacing between signals (Min Gap Bars) prevents excessive clustering.
4. Visuals
Background shading:
Green = Volume Spike in bullish context.
Red = Volume Drop in bearish context.
Alerts can be configured for both conditions.
📈 How to Use
Volume Spikes near highs can indicate breakouts or exhaustion tops.
Volume Drops near lows can signal liquidity dry-up or potential reversals.
Combine with price action or support/resistance for confirmation.
Recommended Timeframes: Works on all timeframes; more reliable on 15m, 1h, 4h.
Markets: Crypto, Forex, Stocks.
⚙️ Inputs
Volume SMA Length
Spike Multiplier / Drop Multiplier
Use Context (High/Low filter)
Min Gap Bars (avoid clustered signals)
⚠️ Disclaimer
This script is for educational purposes only. It does not constitute financial advice.
Always test thoroughly before live trading.
PrismNorm (Rolling)# PrismNorm (Rolling)
Overview
PrismNorm (Rolling) frames four series — VWMA, TWMA, TrueWMA, and a half-price line — over a fixed lookback window, with all series scaled by a chosen volatility measure. Each bar shows how far price has strayed from its rolling anchor, expressed in StdDev, MAD, ATR-scaled, or fixed-percent units.
How It Works
• Compute rolling Weighted Moving Averages over the last lookback bars:
— VWMA: volume-weighted HLC3
— TWMA: simple average of OHLC midpoint
— TrueWMA: TrueRange-weighted TrueMid average
• Anchor each series to its value lookback bars ago (first bar in window). The half-price series uses either close or an SMA lagged by half the window.
• Calculate a volatility measure over volWindowLen = lookback × normMult bars:
— Std Dev of close
— MAD of close
— ATR averaged and scaled to approximate σ
— A fixed percent of the window’s anchor value
• Band width = volatility (or percent of anchor). Normalized output = (net move) ÷ (band width)
Inputs
Settings / Description
• Lookback Period (bars) / Bars used for rolling WMAs and as the anchor lookback
• Deviation Measure / Volatility method: Std Dev, MAD, ATR (scaled), or Percent
• Normalization Span (×Lookback) / Multiplier (1–10) to expand lookback into volatility window
• Percent Deviation (%) / When Percent mode is on, band width = this % of the anchor WMA (or price)
• Scale MAD to σ / Scale Mad by √(π/2) so it aligns with σ under Normal distribution
• Use MA Anchor for Price (½×) / Off: anchor = close ; On: anchor = SMA(close, lookback) shifted by half the lookback
Display
• Show Normalized VWMA
• Show Normalized TWMA
• Show Normalized TrueWMA
• Show Normalized Price (½×)
Tips & Use Cases
• Percent mode yields fixed-width bands, handy for identifying structural shifts without volatility scaling.
• Toggling the MA anchor smooths the reference point, reducing noise in price normalization.
References:
1. TrueWMA Description
## 1. TrueWMA: Volatility-Weighted Price Averaging
What Is TrueWMA?
TrueWMA weights each bar’s TrueMid (TrueRange midpoint) by its TrueRange, so high-volatility bars carry more influence. It blends price level and volatility into one moving average.
In short, it’s a *TrueRange-weighted TrueMid average*.
Pseudocode
// TWMA Example for Comparison
window_size = 50
OHLC = (Open + High + Low + Close) / 4
TWMA = MA(OHLC, window_size)
// VWMA Example for Comparison
window_size = 50
HLC3 = (High + Low + Close) / 3
VWMA = Sum(HLC3 * Volume, window_size) / Sum(Volume, window_size)
// TrueWMA (Rolling)
window_size = 50
max_val = Maximum(Close , High) // TrueRange High
min_val = Minimum(Close , Low) // TrueRange Low
true_mid = (max_val + min_val) / 2 // TrueMid
TrueWMA = Sum(true_mid * TrueRange, window_size) / Sum(TrueRange, window_size)
Interpretation
For each bar, Rolling TrueWMA:
• Computes a TrueMid (“contextual midpoint”) from the prior close and the current bar’s high/low.
• Weights each TrueMid by that bar’s TrueRange.
• Divides the sum of those weighted midpoints by the total TrueRange over the lookback window.
The result is a single series that dynamically blends price levels with recent volatility.
JHW Volume Based Buy and Sell MomentumThe JHW Volume-Based Buy and Sell Momentum indicator is a custom momentum oscillator designed to capture market sentiment based on volume dynamics and price rate of change (ROC). It aims to identify bullish or bearish momentum by analyzing how price reacts to increasing or decreasing trading volume.
Core Logic:
The indicator calculates the Rate of Change (ROC) of the closing price.
It then accumulates this ROC separately based on whether the current volume is lower or higher than the previous bar:
If volume decreases, the ROC is added to a "negative volume index" accumulator.
If volume increases, the ROC is added to a "positive volume index" accumulator.
These two accumulators are combined to form a net momentum line.
Smoothing:
A Simple Moving Average (SMA) is applied to both accumulators over a user-defined period (default: 25 bars).
The sum of these smoothed values forms the signal line.
Visualization:
The indicator plots:
The net momentum line (yellow).
The smoothed signal line (blue).
The area between the two lines is filled with color:
Yellow when momentum is above the signal (bullish).
Blue when momentum is below the signal (bearish).
Bar colors are also adjusted to reflect the current momentum state.
Use Case:
This indicator helps traders:
Detect volume-driven momentum shifts.
Identify potential buy or sell zones based on volume behavior.
Confirm trends or spot early reversals.
PrismNorm (Anchored)# PrismNorm (Anchored)
Overview
PrismNorm plots anchored, span-normalized price averages (VWAP, TWAP, TrueWAP) alongside a half-price line, with all series scaled by a blended volatility measure. This frames price swings across anchor periods of varying lengths in units of recent volatility.
How It Works
On each new anchor span (session, week, month, etc.), the script:
• Resets an anchor line to the first bar’s open.
• Computes raw VWAP, TWAP, TrueWAP and a half-price delta (close–anchor)/2 cumulatively over the span.
• Calculates a deviation metric (Std Dev, MAD, ATR-scaled, or Percent of anchor price) for the current span.
• Blends the current span’s deviation with up to N prior spans (for non-Percent modes).
• Divides each net price series by the blended deviation to yield normalized outputs.
Inputs
Settings / Description
• Anchor Period / Span for resetting the anchor line (Week, Month, etc.)
• Deviation Measure / Volatility method for normalization: Std Dev, MAD, ATR (scaled), or Percent
• Normalization Interval / Number of past spans (current+1 … current+10) to include in blended deviation
• Percent Deviation (%) / Band width % when Percent mode is selected (applied to anchor price)
• Scale MAD to σ / Scale MAD by √(π/2) so it aligns with σ under Normal distribution
Display
• Show Normalized VWAP
• Show Normalized TWAP
• Show Normalized TrueWAP
• Show Normalized Price (½×)
Tips & Use Cases
• Use shorter anchor spans (Session, Week) for intraday normalization.
• Use longer spans (Quarter, Year) to compare price action across macro periods.
References:
1. TrueWAP Description
2. SD, MAD, ATR (scaled) Deviation Measure Methodology
## 1. TrueWAP: Volatility-Weighted Price Averaging
What Is TrueWAP?
TrueWAP plugs actual price fluctuations into your average. Instead of only tracking time (TWAP) or volume (VWAP), it weights each bar’s TrueMid (TrueRange midpoint) by its TrueRange—so when the market moves more, that bar counts more.
In short, it’s a *TrueRange-weighted TrueMid average* anchored at your start date.
TrueWAP (Anchored) Overview
• On the first bar, it uses the simple high-low midpoint for price and the bar’s high-low range for weighting.
• From the next bar onward, it computes TrueMid (TrueRange midpoint).
• Each TrueMid is weighted by its TrueRange and cumulatively summed from the anchor point.
Pseudocode
// TWAP Example for Comparison
current_days = BarsSince("start_of_period")
OHLC = (Open + High + Low + Close) / 4
TWAP = MA(OHLC, current_days)
// VWAP Example for Comparison
current_days = BarsSince("start_of_period")
HLC3 = (High + Low + Close) / 3
VWAP = Sum(HLC3 * Volume, current_days) / Sum(Volume, current_days)
// TrueWAP (Anchored)
current_days = BarsSince("start_of_period") // Count of bars since the period began
first_bar = (current_days == 0) // Boolean flag if current bar is 1st of period
hilo_mid = (High + Low) / 2
max_val = max(Close , High)
min_val = min(Close , Low)
true_mid = (max_val + min_val) / 2
// Use hilo_mid and (High - Low) for the first bar; otherwise, use true_mid and True Range
mid_val = IF(first_bar, hilo_mid, true_mid)
range_val = IF(first_bar, (High - Low), TrueRange)
TrueWAP = Sum(mid_val * range_val, current_days) / Sum(range_val, current_days)
Recap: Interpretation
• The first bar uses the simple high-low midpoint and range.
• Subsequent bars use TrueMid and TrueRange based on prior close.
• This ensures the average reflects only the observed volatility and price since the anchor.
A Note on True Range
TrueRange captures the full extent of bar-to-bar volatility as the maximum of:
• High – Low
• |High – Previous Close|
• |Low – Previous Close|
## 2. SD, MAD, ATR (scaled) Deviation Measure Methodology: Segmented Weighted-Average Volatility
### Introduction
Conventional standard deviation calculations aggregate data over an expanding window and rely on a single mean, producing one summary statistic. This can obscure segmented, sequential datasets—such as MTD, QTD, and YTD—where additional granularity and time-sensitive insights matter.
This methodology isolates standard deviation within defined time frames and then proportionally allocates them based on custom lookback criteria. The result is a dynamic, multi-period normalization benchmark that captures both emerging volatility and historical stability.
Note: While this example uses SD, the same fixed-point approach applies to MAD and ATR (scaled).
### 2.1 Standard Deviation (Rolling Window)
pseudocode
// -- STANDARD DEVIATION (ROLLING) Calculation --
window_size = 20
rolling_SD = STDDEV(Close, window_size)
• Ideal for immediate trading insights.
• Reflects pure, short-term price dynamics.
• Captures volatility using the most recent 20 bars.
### 2.2 Blended SD: Current + 3 Past Periods
This method fuses current month data with the last three complete months.
pseudocode
// -- MULTI-PERIOD STANDARD DEVIATION (PROXY) with Three Past Periods --
current_days = BarsSince("start_of_month")
current_SD = STDDEV(Close, current_days)
prev1_days = TradingDaysLastMonth
prev1_SD = STDDEV_LastMonth(Close)
prev2_days = TradingDaysTwoMonthsAgo
prev2_SD = STDDEV_TwoMonthsAgo(Close)
prev3_days = TradingDaysThreeMonthsAgo
prev3_SD = STDDEV_ThreeMonthsAgo(Close)
// Blending with Proportional Weights
Weighted_SD = (current_SD * current_days +
prev1_SD * prev1_days +
prev2_SD * prev2_days +
prev3_SD * prev3_days) /
(current_days + prev1_days + prev2_days + prev3_days)
• Merges evolving volatility with the stability of three prior months.
• Weights each period by its trading days.
• Yields a robust normalization benchmark.
### 2.3 Blended SD: Current + 1 Past Period
This variant tempers emerging volatility by blending the current month with last month only.
pseudocode
// -- MULTI-PERIOD STANDARD DEVIATION (PROXY) with One Past Period --
current_days = BarsSince("start_of_month")
current_SD = STDDEV(Close, current_days)
prev1_days = TradingDaysLastMonth
prev1_SD = STDDEV_LastMonth(Close)
// Proportional Blend
Weighted_SD = (current_SD * current_days +
prev1_SD * prev1_days) /
(current_days + prev1_days)
• Anchors current volatility to last month’s baseline.
• Softens spikes by blending with historical data.
Conclusion
Segmented weighted-average volatility transforms global benchmarking by integrating immediate market dynamics with historical context. This fixed-point approach—applicable to SD, MAD, and ATR (scaled)—delivers time-sensitive analysis.
Price-Volume Strength Meter (Color Zones)The Price-Volume Strength Meter is a custom-built tool designed to help traders assess market strength by analyzing both price action and volume behavior. It generates a smoothed strength signal and color-coded visualization for quick decision-making.
🔍 Key Features:
✅ Dual Momentum Analysis – Evaluates price and volume movements to identify strong or weak trends.
🎨 Color Zones –
🟢 Green: Bullish strength
🔴 Red: Bearish strength
🟡 Yellow: Sideways or indecisive zone
🧠 Smoothed Output – Uses internal smoothing to reduce noise and provide a cleaner trend view.
📊 Strength Range:
+100: Strong Bullish
+50: Weak Bullish
0: Neutral
-50: Weak Bearish
-100: Strong Bearish
This indicator can be used as a market strength confirmation tool for trend-following strategies or to filter out sideways/no-trade zones. Ideal for intraday to swing trading setups.
Smart Money Breakout Channels [AlgoAlpha]🟠 OVERVIEW
This script draws breakout detection zones called “Smart Money Breakout Channels” based on volatility-normalized price movement and visualizes them as dynamic boxes with volume overlays. It identifies temporary accumulation or distribution ranges using a custom normalized volatility metric and tracks when price breaks out of those zones—either upward or downward. Each channel represents a structured range where smart money may be active, helping traders anticipate key breakouts with added context from volume delta, up/down volume, and a visual gradient gauge for momentum bias.
🟠 CONCEPTS
The script calculates normalized price volatility by measuring the standard deviation of price mapped to a scale using the highest and lowest prices over a set lookback period. When normalized volatility reaches a local low and flips upward, a boxed channel is drawn between the highest and lowest prices in that zone. These boxes persist until price breaks out, either with a strong candle close (configurable) or by touching the boundary. Volume analysis enhances interpretation by rendering delta bars inside the box, showing volume distribution during the channel. Additionally, a real-time visual “gauge” shows where volume delta sits within the channel range, helping users spot pressure imbalances.
🟠 FEATURES
Automatic detection and drawing of breakout channels based on volatility-normalized price pivots.
Optional nested channels to allow multiple simultaneous zones or a clean single-zone view.
Gradient-filled volume gauge with dynamic pointer to show current delta pressure within the box.
Three volume visualization modes: raw volume, comparative up/down volume, and delta.
Alerts for new channel creation and confirmed bullish or bearish breakouts.
🟠 USAGE
Apply the indicator to any chart. Wait for a new breakout box to form—this occurs when volatility behavior shifts and a stable range emerges. Once a box appears, monitor price relative to its boundaries. A breakout above suggests bullish continuation, below suggests bearish continuation; signals are stronger when “Strong Closes Only” is enabled.
Watch the internal volume candles to understand where buy/sell pressure is concentrated during the box. Use the gauge on the right to interpret whether net pressure is building upward or downward before breakout to anticipate the direction.
Use alerts to catch breakout events without needing to monitor the chart constantly 🚨.
15Min Volume x3 Spikeit show high power candels to conferm breakouts to hekp traders understand market better
BT Bar - 1.0 BTBar Description
BTBar is a visual script designed to identify and highlight candles with abnormally high volume, making it easier for traders to spot pressure imbalances and key price areas during live market action.
🔍 The script compares the current candle’s volume to the previous one, and highlights candles that exceed specific percentage thresholds (customizable by the user) using distinct colors.
Rather than relying on generic trend or scalping strategies, BTBar is based on relative volume intensity detection — a concept rooted in order flow analysis — to help traders identify:
Candles with unusual volume spikes (possible absorption or exhaustion),
Medium/high volume continuation signals,
Areas where price might reverse or accelerate.
🛠️ It also offers the option to automatically draw horizontal lines from the open of the highest-volume candles, helping traders track potential institutional decision levels throughout the day.
⚙️ How to use:
Apply BTBar to a clean chart.
Customize the volume threshold levels (e.g., 300%, 400%, etc.).
Watch for highlighted candles — these indicate moments when volume significantly broke previous levels, marking potential points of interest or behavior shifts.
Use the optional horizontal lines as visual support/resistance levels derived from volume extremes.
🧠 Underlying concept:
BTBar uses a percentage-based volume comparison approach, inspired by techniques in footprint charts and volume spike detection.
This allows traders to visually spot key market reactions without relying on numeric overload or complex setups.
Hidden Liquidity Shift DetectorPurpose
The Hidden Liquidity Shift Detector identifies candles that indicate potential hidden accumulation or distribution activity based on volume and price action behavior. These setups often represent institutional absorption of liquidity ahead of larger moves.
How It Works
The script detects candles with the following characteristics:
Small real body relative to the total candle range
A strong wick (upper or lower) indicating rejection
Volume significantly higher than the recent average
It flags:
Hidden Selling (Distribution) when a bearish candle has a long upper wick and high volume
Hidden Buying (Accumulation) when a bullish candle has a long lower wick and high volume
These candles are often missed by traditional indicators but may precede significant reversals or breakouts.
Features
Automatic detection of absorption-style candles
Volume spike filtering based on configurable multiplier
Wick and body ratio thresholds to fine-tune signal quality
Non-intrusive signal markers (colored circles)
Real-time alerts for hidden buying/selling signals
Usage Tips
Use on 15m to 4H charts for intraday detection, or Daily for swing setups
Combine with support/resistance or volume profile zones for higher conviction
Clusters of signals in the same area increase reversal probability
Can be used alongside Wyckoff-style logic or smart money concepts
PrismWMA (Rolling)# PrismWMA (Rolling)
Overview
PrismWMA computes rolling VWMA, TWMA and TrueWMA over a fixed lookback window, then plots dynamic volatility bands around each. It’s the rolling-window counterpart to PrismWAP’s anchored spans, giving you per-bar, up-to-date average levels and band excursions.
How It Works
Every bar, PrismWMA:
• Calculates VWMA, TWMA and TrueWMA over the last wmaWindowLen bars.
• Computes your chosen volatility measure (Std Dev, MAD, ATR-scaled) or Percent of WMA over volWindowLen bars.
• Draws upper/lower bands as ±mult × volatility (or ±mult % of the WMA in Percent mode).
Inputs
Settings/Default/Description
WMA Lookback (bars)/50/Number of bars for rolling WMA
Volatility Measure/Std Dev/Band width method: Std Dev, MAD, ATR (scaled), or Percent of WMA
Volatility Lookback (bars)/50/Number of bars used to compute rolling volatility
Band Multiplier (or %)/3.0/Multiplier for band width (or percent of WMA in Percent mode)
Scale MAD to σ/true/When MAD is selected, scale by √(π/2) so it aligns with σ
Display
• Show VWMA true
• Show TWMA true
• Show TrueWMA true
• Show VBands false
• Show TBands false
• Show TrueBands true
References:
1. TrueWMA Description
## 1. TrueWMA: Volatility-Weighted Price Averaging
What Is TrueWMA?
TrueWMA weights each bar’s TrueMid (TrueRange midpoint) by its TrueRange, so high-volatility bars carry more influence. It blends price level and volatility into one moving average
Pseudocode
// TWMA Example for Comparison
window_size = 50
OHLC = (Open + High + Low + Close) / 4
TWMA = MA(OHLC, window_size)
// VWMA Example for Comparison
window_size = 50
HLC3 = (High + Low + Close) / 3
VWMA = Sum(HLC3 * Volume, window_size) / Sum(Volume, window_size)
// TrueWMA (Rolling)
window_size = 50
max_val = Maximum(Close , High)
min_val = Minimum(Close , Low)
true_mid = (max_val + min_val) / 2
TrueWMA = Sum(true_mid * TrueRange, window_size) / Sum(TrueRange, window_size)
Interpretation
For each bar, Rolling TrueWMA:
• Computes a TrueMid (“contextual midpoint”) from the prior close and the current bar’s high/low.
• Weights each TrueMid by that bar’s TrueRange.
• Divides the sum of those weighted midpoints by the total TrueRange over the lookback window.
The result is a single series that dynamically blends price levels with recent volatility.
RSI WMA VWMA Divergence Indicator// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © Kenndjk
//@version=6
indicator(title="RSI WMA VWMA Divergence Indicator", shorttitle="Kenndjk", format=format.price, precision=2)
oscType = input.string("RSI", "Oscillator Type", options = , group="General Settings")
// RSI Settings
rsiGroup = "RSI Settings"
rsiLengthInput = input.int(14, minval=1, title="RSI Length", group=rsiGroup)
rsiSourceInput = input.source(close, "Source", group=rsiGroup)
// WMA VWMA
wmaLength = input.int(9, "WMA Length", minval=1, group="WMA Settings")
vwmaLength = input.int(3, "VWMA Length", minval=1, group="WMA Settings")
wma = ta.wma(close, wmaLength)
vwma = ta.vwma(close, vwmaLength)
useVWMA = input.bool(true, "Use VWMA for Divergence (when WMA + VWMA mode)", group="WMA Settings")
// Oscillator selection
rsi = ta.rsi(rsiSourceInput, rsiLengthInput) // Calculate RSI always, but use conditionally
osc = oscType == "RSI" ? rsi : useVWMA ? vwma : wma
// RSI plots (conditional)
isRSI = oscType == "RSI"
rsiPlot = plot(isRSI ? rsi : na, "RSI", color=isRSI ? #7E57C2 : na)
rsiUpperBand = hline(isRSI ? 70 : na, "RSI Upper Band", color=isRSI ? #787B86 : na)
midline = hline(isRSI ? 50 : na, "RSI Middle Band", color=isRSI ? color.new(#787B86, 50) : na)
rsiLowerBand = hline(isRSI ? 30 : na, "RSI Lower Band", color=isRSI ? #787B86 : na)
fill(rsiUpperBand, rsiLowerBand, color=isRSI ? color.rgb(126, 87, 194, 90) : na, title="RSI Background Fill")
midLinePlot = plot(isRSI ? 50 : na, color = na, editable = false, display = display.none)
fill(rsiPlot, midLinePlot, 100, 70, top_color = isRSI ? color.new(color.green, 0) : na, bottom_color = isRSI ? color.new(color.green, 100) : na, title = "Overbought Gradient Fill")
fill(rsiPlot, midLinePlot, 30, 0, top_color = isRSI ? color.new(color.red, 100) : na, bottom_color = isRSI ? color.new(color.red, 0) : na, title = "Oversold Gradient Fill")
// WMA VWMA plots
wmaColor = oscType != "RSI" ? (useVWMA ? color.new(color.blue, 70) : color.blue) : na
wmaWidth = useVWMA ? 1 : 2
vwmaColor = oscType != "RSI" ? (useVWMA ? color.orange : color.new(color.orange, 70)) : na
vwmaWidth = useVWMA ? 2 : 1
plot(oscType != "RSI" ? wma : na, "WMA", color=wmaColor, linewidth=wmaWidth)
plot(oscType != "RSI" ? vwma : na, "VWMA", color=vwmaColor, linewidth=vwmaWidth)
// Smoothing MA inputs (only for RSI)
GRP = "Smoothing (RSI only)"
TT_BB = "Only applies when 'Show Bollinger Bands' is selected. Determines the distance between the SMA and the bands."
maLengthSMA = input.int(14, "SMA Length", minval=1, group=GRP, display=display.data_window)
maLengthEMA = input.int(14, "EMA Length", minval=1, group=GRP, display=display.data_window)
maLengthRMA = input.int(14, "SMMA (RMA) Length", minval=1, group=GRP, display=display.data_window)
maLengthWMA = input.int(14, "WMA Length", minval=1, group=GRP, display=display.data_window)
maLengthVWMA = input.int(14, "VWMA Length", minval=1, group=GRP, display=display.data_window)
bbMultInput = input.float(2.0, "BB StdDev", minval=0.001, maxval=50, step=0.5, tooltip=TT_BB, group=GRP, display=display.data_window)
showSMA = input.bool(false, "Show SMA", group=GRP)
showEMA = input.bool(false, "Show EMA", group=GRP)
showRMA = input.bool(false, "Show SMMA (RMA)", group=GRP)
showWMAsmooth = input.bool(false, "Show WMA", group=GRP)
showVWMAsmooth = input.bool(false, "Show VWMA", group=GRP)
showBB = input.bool(false, "Show SMA + Bollinger Bands", group=GRP, tooltip=TT_BB)
// Smoothing MA Calculations
sma_val = (showSMA or showBB) and isRSI ? ta.sma(rsi, maLengthSMA) : na
ema_val = showEMA and isRSI ? ta.ema(rsi, maLengthEMA) : na
rma_val = showRMA and isRSI ? ta.rma(rsi, maLengthRMA) : na
wma_val = showWMAsmooth and isRSI ? ta.wma(rsi, maLengthWMA) : na
vwma_val = showVWMAsmooth and isRSI ? ta.vwma(rsi, maLengthVWMA) : na
smoothingStDev = showBB and isRSI ? ta.stdev(rsi, maLengthSMA) * bbMultInput : na
// Smoothing MA plots
plot(sma_val, "RSI-based SMA", color=(showSMA or showBB) ? color.yellow : na, display=(showSMA or showBB) ? display.all : display.none, editable=(showSMA or showBB))
plot(ema_val, "RSI-based EMA", color=showEMA ? color.purple : na, display=showEMA ? display.all : display.none, editable=showEMA)
plot(rma_val, "RSI-based RMA", color=showRMA ? color.red : na, display=showRMA ? display.all : display.none, editable=showRMA)
plot(wma_val, "RSI-based WMA", color=showWMAsmooth ? color.blue : na, display=showWMAsmooth ? display.all : display.none, editable=showWMAsmooth)
plot(vwma_val, "RSI-based VWMA", color=showVWMAsmooth ? color.orange : na, display=showVWMAsmooth ? display.all : display.none, editable=showVWMAsmooth)
bbUpperBand = plot(showBB ? sma_val + smoothingStDev : na, title="Upper Bollinger Band", color=showBB ? color.green : na, display=showBB ? display.all : display.none, editable=showBB)
bbLowerBand = plot(showBB ? sma_val - smoothingStDev : na, title="Lower Bollinger Band", color=showBB ? color.green : na, display=showBB ? display.all : display.none, editable=showBB)
fill(bbUpperBand, bbLowerBand, color=showBB ? color.new(color.green, 90) : na, title="Bollinger Bands Background Fill", display=showBB ? display.all : display.none, editable=showBB)
// Divergence Settings
divGroup = "Divergence Settings"
calculateDivergence = input.bool(true, title="Calculate Divergence", group=divGroup, tooltip = "Calculating divergences is needed in order for divergence alerts to fire.")
lookbackLeft = input.int(5, "Pivot Lookback Left", minval=1, group=divGroup)
lookbackRight = input.int(5, "Pivot Lookback Right", minval=1, group=divGroup)
rangeLower = input.int(5, "Min Range for Divergence", minval=0, group=divGroup)
rangeUpper = input.int(60, "Max Range for Divergence", minval=1, group=divGroup)
showHidden = input.bool(true, "Show Hidden Divergences", group=divGroup)
bearColor = color.red
bullColor = color.green
textColor = color.white
noneColor = color.new(color.white, 100)
_inRange(cond) =>
bars = ta.barssince(cond)
rangeLower <= bars and bars <= rangeUpper
bool plFound = false
bool phFound = false
bool bullCond = false
bool bearCond = false
bool hiddenBullCond = false
bool hiddenBearCond = false
float oscLBR = na
float lowLBR = na
float highLBR = na
float prevPlOsc = na
float prevPlLow = na
float prevPhOsc = na
float prevPhHigh = na
if calculateDivergence
plFound := not na(ta.pivotlow(osc, lookbackLeft, lookbackRight))
phFound := not na(ta.pivothigh(osc, lookbackLeft, lookbackRight))
oscLBR := osc
lowLBR := low
highLBR := high
prevPlOsc := ta.valuewhen(plFound, oscLBR, 1)
prevPlLow := ta.valuewhen(plFound, lowLBR, 1)
prevPhOsc := ta.valuewhen(phFound, oscLBR, 1)
prevPhHigh := ta.valuewhen(phFound, highLBR, 1)
// Regular Bullish
oscHL = oscLBR > prevPlOsc and _inRange(plFound )
priceLL = lowLBR < prevPlLow
bullCond := priceLL and oscHL and plFound
// Regular Bearish
oscLL = oscLBR < prevPhOsc and _inRange(phFound )
priceHH = highLBR > prevPhHigh
bearCond := priceHH and oscLL and phFound
// Hidden Bullish
oscLL_hidden = oscLBR < prevPlOsc and _inRange(plFound )
priceHL = lowLBR > prevPlLow
hiddenBullCond := priceHL and oscLL_hidden and plFound and showHidden
// Hidden Bearish
oscHH_hidden = oscLBR > prevPhOsc and _inRange(phFound )
priceLH = highLBR < prevPhHigh
hiddenBearCond := priceLH and oscHH_hidden and phFound and showHidden
// Plot divergences (lines and labels on pane)
if bullCond
leftBar = ta.valuewhen(plFound, bar_index , 1)
line.new(leftBar, prevPlOsc, bar_index , oscLBR, xloc=xloc.bar_index, color=bullColor, width=2)
label.new(bar_index , oscLBR, "R Bull", style=label.style_label_up, color=noneColor, textcolor=textColor)
if bearCond
leftBar = ta.valuewhen(phFound, bar_index , 1)
line.new(leftBar, prevPhOsc, bar_index , oscLBR, xloc=xloc.bar_index, color=bearColor, width=2)
label.new(bar_index , oscLBR, "R Bear", style=label.style_label_down, color=noneColor, textcolor=textColor)
if hiddenBullCond
leftBar = ta.valuewhen(plFound, bar_index , 1)
line.new(leftBar, prevPlOsc, bar_index , oscLBR, xloc=xloc.bar_index, color=bullColor, width=2, style=line.style_dashed)
label.new(bar_index , oscLBR, "H Bull", style=label.style_label_up, color=noneColor, textcolor=textColor)
if hiddenBearCond
leftBar = ta.valuewhen(phFound, bar_index , 1)
line.new(leftBar, prevPhOsc, bar_index , oscLBR, xloc=xloc.bar_index, color=bearColor, width=2, style=line.style_dashed)
label.new(bar_index , oscLBR, "H Bear", style=label.style_label_down, color=noneColor, textcolor=textColor)
// Alert conditions
alertcondition(bullCond, title="Regular Bullish Divergence", message="Found a new Regular Bullish Divergence, Pivot Lookback Right number of bars to the left of the current bar.")
alertcondition(bearCond, title="Regular Bearish Divergence", message="Found a new Regular Bearish Divergence, Pivot Lookback Right number of bars to the left of the current bar.")
alertcondition(hiddenBullCond, title="Hidden Bullish Divergence", message="Found a new Hidden Bullish Divergence, Pivot Lookback Right number of bars to the left of the current bar.")
alertcondition(hiddenBearCond, title="Hidden Bearish Divergence", message="Found a new Hidden Bearish Divergence, Pivot Lookback Right number of bars to the left of the current bar.")
PrismWAP (Anchored)# PrismWAP (Anchored)
Overview
PrismWAP plots three anchored weighted-average prices (VWAP, TWAP, TrueWAP) with dynamic volatility bands and a resettable anchor line. It helps you see key value levels since your chosen anchor period and gauge price excursions relative to volatility.
How It Works
On each new span (session, week, month, quarter, etc.), the indicator resets a base price from the first bar’s open. It computes anchored VWAP, TWAP, and TrueWAP cumulatively over the span. Volatility bands are drawn as ±multiplier × a span-length-weighted average of your chosen volatility measure (Std Dev, MAD, ATR-scaled, or Percent of WAP).
Inputs
Settings/Default/Description
Anchor Period/Quarter/Span for resetting WAP and anchor line (Week, Month, etc.)
Volatility Measure/Std Dev/Method for band width: SD, MAD, ATR (scaled), Percent of WAP
Volatility Spans/current+2/Number of spans (current + previous spans) used in volatility
Band Multiplier(or %)/3.0/Multiplier for band width (or Percent of WAP in Percent mode)
Scale MAD to σ/true/When MAD selected, scale by √(π/2) so it aligns with σ
Display
• Show Anchor Line true
• Show VWAP true
• Show TWAP true
• Show TrueWAP true
• Show VWAP Bands false
• Show TWAP Bands false
• Show TrueWAP Bands true
Tips & Use Cases
• Use shorter spans (Session, Week) for sub-daily bar intervals.
• Use longer spans (Quarter, Year) for daily bar intervals.
References:
1. TrueWAP Description
2. SD, MAD, ATR (scaled) weighted average volatility
## 1. TrueWAP: Volatility-Weighted Price Averaging
What Is TrueWAP?
TrueWAP plugs actual price fluctuations into your average. Instead of only tracking time (TWAP) or volume (VWAP), it weights each bar’s TrueRange midpoint by its TrueRange—so when the market moves more, that bar counts more.
TrueWAP (Anchored) Overview
• On the first bar, it uses the simple high-low midpoint for price and the bar’s high-low range for weighting.
• From the next bar onward, it computes TrueMid by averaging the TrueRange high (higher of prior close or current high) with the TrueRange low (lower of prior close or current low).
• Each TrueMid is weighted by its TrueRange and cumulatively summed from the anchor point.
Pseudocode
// TWAP Example for Comparison
current_days = BarsSince("start_of_period")
OHLC = (Open + High + Low + Close) / 4
TWAP = MA(OHLC, current_days)
// VWAP Example for Comparison
current_days = BarsSince("start_of_period")
HLC3 = (High + Low + Close) / 3
VWAP = Sum(HLC3 * Volume, current_days) / Sum(Volume, current_days)
// TrueWAP (Anchored)
current_days = BarsSince("start_of_period") // Count of bars since the period began
first_bar = (current_days == 0) // Boolean flag that is true if current bar is the first of period
hilo_mid = (High + Low) / 2 // For the first bar, use its simple high/low avg
max_val = max(Close , High) // For subsequent bars, TrueRange high
min_val = min(Close , Low) // For subsequent bars, TrueRange low
true_mid = (max_val + min_val) / 2 // True Range midpoint for subsequent bars
// Use hilo_mid and (High - Low) for the first bar; otherwise, use true_mid and True Range
mid_val = IF(first_bar, hilo_mid, true_mid)
range_val = IF(first_bar, (High - Low), TrueRange)
TrueWAP = Sum(mid_val * range_val, current_days) / Sum(range_val, current_days)
Recap: Interpretation
• The first bar uses the simple high-low midpoint and range.
• Subsequent bars use TrueMid and TrueRange based on prior close.
• This ensures the average reflects only the observed volatility and price since the anchor.
A Note on True Range
TrueRange captures the full extent of bar-to-bar volatility as the maximum of:
• High – Low
• |High – Previous Close|
• |Low – Previous Close|
## 2. Segmented Weighted-Average Volatility: A Fixed-Point Multi-Period Approach
### Introduction
Conventional standard deviation calculations aggregate data over an expanding window and rely on a single mean, producing one summary statistic. This can obscure segmented, sequential datasets—such as MTD, QTD, and YTD—where additional granularity and time-sensitive insights matter.
This methodology isolates standard deviation within defined time frames and then proportionally allocates them based on custom lookback criteria. The result is a dynamic, multi-period normalization benchmark that captures both emerging volatility and historical stability.
Note: While this example uses SD, the same fixed-point approach applies to MAD and ATR (scaled).
### 2.1 Standard Deviation (Rolling Window)
pseudocode
// -- STANDARD DEVIATION (ROLLING) Calculation --
window_size = 20
rolling_SD = STDDEV(Close, window_size)
• Ideal for immediate trading insights.
• Reflects pure, short-term price dynamics.
• Captures volatility using the most recent 20 trading days.
### 2.2 Blended SD: Current + 3 Past Periods
This method fuses current month data with the last three complete months.
pseudocode
// -- MULTI-PERIOD STANDARD DEVIATION (PROXY) with Three Past Periods --
current_days = BarsSince("start_of_month")
current_SD = STDDEV(Close, current_days)
prev1_days = TradingDaysLastMonth
prev1_SD = STDDEV_LastMonth(Close)
prev2_days = TradingDaysTwoMonthsAgo
prev2_SD = STDDEV_TwoMonthsAgo(Close)
prev3_days = TradingDaysThreeMonthsAgo
prev3_SD = STDDEV_ThreeMonthsAgo(Close)
// Blending with Proportional Weights
Weighted_SD = (current_SD * current_days +
prev1_SD * prev1_days +
prev2_SD * prev2_days +
prev3_SD * prev3_days) /
(current_days + prev1_days + prev2_days + prev3_days)
• Merges evolving volatility with the stability of three prior months.
• Weights each period by its trading days.
• Yields a robust normalization benchmark.
### 2.3 Blended SD: Current + 1 Past Period
This variant tempers emerging volatility by blending the current month with last month only.
pseudocode
// -- MULTI-PERIOD STANDARD DEVIATION (PROXY) with One Past Period --
current_days = BarsSince("start_of_month")
current_SD = STDDEV(Close, current_days)
prev1_days = TradingDaysLastMonth
prev1_SD = STDDEV_LastMonth(Close)
// Proportional Blend
Weighted_SD = (current_SD * current_days +
prev1_SD * prev1_days) /
(current_days + prev1_days)
• Anchors current volatility to last month’s baseline.
• Softens spikes by blending with historical data.
Conclusion
Segmented weighted-average volatility transforms global benchmarking by integrating immediate market dynamics with enduring historical context. This fixed-point approach—applicable to SD, MAD (scaled), and ATR (scaled)—delivers time-sensitive analysis.
VOLUME Simple [Titans_Invest]VOLUME Simple
A streamlined volume analysis tool crafted for simplicity and smart signal detection.
Although simple in appearance, this indicator brings intelligent volume-based entries through configurable logic. Its design emphasizes clean and effective interpretation of volume signals.
⯁ WHAT IS THE VOLUME INDICATOR❓
The Volume indicator is a fundamental technical analysis tool that measures the number of shares or contracts traded in a security or market during a given period. It helps traders and investors understand the strength or weakness of a price movement, confirm trends, and predict potential reversals. Volume is typically displayed as a histogram below a price chart, with each bar representing the volume traded during a specific time interval.
⯁ HOW TO USE THE VOLUME❓
The Volume indicator can be used in several ways to enhance trading decisions:
• Trend Confirmation: High volume during a price move confirms the strength of that trend, while low volume can indicate a weak or unsustainable trend.
• Breakouts: A price breakout from a pattern or range accompanied by high volume is more likely to be valid and sustainable.
• Divergence: When the price moves in one direction and volume moves in the opposite direction, it can signal a potential reversal.
• Overbought/Oversold Conditions: Extreme volume levels can sometimes indicate that an asset is overbought or oversold, though this is less straightforward than with oscillators like the RSI.
⯁ ENTRY CONDITIONS
The conditions below are fully flexible and allow for complete customization of the signal.
______________________________________________________
🔹 CONDITIONS TO BUY 📈
______________________________________________________
▪︎ Signal Validity: The signal will remain valid for X bars .
🔹 volume > volume_MA * Trigger Signal (close > open)
🔹 volume > volume_MA * Trigger Signal (Keep State)
______________________________________________________
______________________________________________________
🔸 CONDITIONS TO SELL 📉
______________________________________________________
▪︎ Signal Validity: The signal will remain valid for X bars .
🔸 volume > volume_MA * Trigger Signal (close > open)
🔸 volume > volume_MA * Trigger Signal (Keep State)
______________________________________________________
______________________________________________________
🤖 AUTOMATION 🤖
• You can automate the BUY and SELL signals of this indicator.
______________________________________________________
______________________________________________________
⯁ UNIQUE FEATURES
______________________________________________________
Signal Validity: The signal will remain valid for X bars
Condition Table: BUY/SELL
Condition Labels: BUY/SELL
Plot Labels in the Graph Above: BUY/SELL
Automate and Monitor Signals/Alerts: BUY/SELL
Signal Validity: The signal will remain valid for X bars
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Automate & Monitor Signals/Alerts: BUY/SELL
______________________________________________________
📜 SCRIPT : VOLUME Simple
🎴 Art by : @Titans_Invest & @DiFlip
👨💻 Dev by : @Titans_Invest & @DiFlip
🎑 Titans Invest — The Wizards Without Gloves 🧤
✨ Enjoy!
______________________________________________________
o Mission 🗺
• Inspire Traders to manifest Magic in the Market.
o Vision 𐓏
• To elevate collective Energy 𐓷𐓏
🧠 Rogue BTC Dominance + BTC Price MonitorLiquidity never lies.
When whales are done pumping, they exit before price tanks, often during sideways chop or fake strength.
So we build a tracker that detects:
Volume drop during uptrend (distribution phase)
Exchange inflows of coins
Rising USDT.D while price holds → stealth exit
Divergence between price & on-chain flows
👁️ Quick Use Case: BTC/USDT with USDT.D Overlay
If you see this pattern:
BTC sideways or slow uptrend
Volume declining
USDT.D rising
BTC.D holding flat
→ Liquidity Exit Detected.
Smart money is exiting quietly, waiting for retail to hold the bag.
Waterfall ScreenerHow to Use This to Screen Stocks: A Step-by-Step Guide
Save the Screener Script: Open the Pine Editor, paste the code above, and save it with a clear name like "Waterfall Screener".
Open the Stock Screener: Go to the TradingView homepage or any chart page and click the "Screener" tab at the bottom. Make sure you are on the "Stock" screener.
Set Your Market: Choose the market you want to scan (e.g., NASDAQ, NYSE).
Add Your Custom Filter (The Magic Step):
Click the "Filters" button on the right side of the screener panel.
In the search box that appears, type the name of your new script: "Waterfall Screener".
It will appear as a selectable filter. Click it.
Configure the Filter:
A new filter will appear in your screener list named "Waterfall Screener".
You can now set conditions for the "ScreenerSignal" value we plotted.
To find stocks with a new, actionable trade plan, set the filter to:
Waterfall Screener | Equal | 1
Refine and Scan:
Add other essential filters to reduce noise, such as:
Volume > 1M (to find liquid stocks)
Market Cap > 1B (to find established companies)
The screener will now automatically update and show you a list of all stocks that currently have a "PENDING_ENTRY" setup according to the indicator's logic and your chosen timeframe (e.g., Daily).
CBC Flip with Volume [Pt]█ CBC Flip with Volume
A price-action based indicator that detects real-time control flips between bulls and bears, enhanced with volume filtering and Pine Screener compatibility.
This tool tracks when the market shifts from bear control to bull control or vice versa, using candle structure and volume behavior. It highlights key reversal points, filters low-conviction moves, and provides two screener-ready outputs for directional monitoring.
█ What It Detects
This script identifies when control flips between buyers and sellers on a candle-by-candle basis. A flip is confirmed only when both price structure and volume meet strict criteria. The indicator uses an internal state to track who is in control and updates when a flip occurs.
█ Flip Conditions
Bull Flip
• Previous bar was under bear control
• Current candle closes above the previous high
• Candle is bullish (close is above open)
• Volume is greater than the previous bar
Bear Flip
• Previous bar was under bull control
• Current candle closes below the previous low
• Candle is bearish (close is below open)
• Volume is greater than the previous bar
When a flip occurs, the indicator updates the control state and records the open price of the flip candle.
█ Strong Flip Detection
A flip is considered strong when volume is also greater than the average volume over a set number of candles (default is 50). Strong flips are visually emphasized using larger markers and darker background shading. This helps filter out moves that lack follow-through volume.
█ Visual Elements on Chart
• Bull Flip (Normal): Small teal triangle below the candle
• Bull Flip (Strong): Larger green triangle below the candle
• Bear Flip (Normal): Small salmon triangle above the candle
• Bear Flip (Strong): Larger red triangle above the candle
• Background Color:
– Green shades for bull flips
– Red shades for bear flips
– Darker color when flip is strong
These visual elements appear only on the candle where a flip is detected. No markers are shown on continuation candles.
█ Inputs
• Volume MA Lookback : Sets the moving average length used for determining whether volume is high enough for a strong flip (default: 50)
█ Alerts
• Bull Flip – Notifies when bulls take control
• Bear Flip – Notifies when bears take control
Alerts are triggered at candle close.
█ Pine Screener Support
This script includes two output columns for TradingView’s Pine Screener:
• Bull in Control (% gain) : Shows the percentage gain from the bull flip’s open to the current close. Resets to 0 when bulls lose control.
• Bear in Control (% gain) : Shows the percentage drop from the bear flip’s open to the current close (as a positive number). Resets to 0 when bears lose control.
These outputs allow you to filter for active moves. For example:
• Bull in Control (% gain) > 2.0 to find strong uptrends
• Bear in Control (% gain) > 1.5 to find sharp breakdowns
█ Use Cases
• Confirm breakouts using volume-backed flips
• Spot short-term reversals at key zones
• Filter out low-volume chop
• Combine screener results with trend or volatility filters
• Build entries around control flips and follow-through strength
Inspired by MapleStax’s original CBC method.
Relative Volume Pulse [Asa]Relative Volume Pulse is a powerful intraday tool designed to help you instantly spot volume surges and anomalies compared to recent history. It highlights how today’s volume at each bar time compares to the typical volume observed at the same time over your chosen number of previous days. With intuitive color-coding and threshold logic, you can quickly identify both significant and extreme spikes in buying or selling activity—ideal for day traders, scalpers, and anyone who cares about real-time volume dynamics.
Key Features
Smart Intraday Volume Benchmarking:
Compares today’s volume to the average volume at the exact same time over the past X days, automatically adapting to typical intraday volume waves.
Dynamic Color Coding:
Up/Down Volume Bars:
Uses different colors for bullish and bearish candles.
Threshold Highlights:
Volume bars that exceed user-defined multiples of average (“Large” and “Extreme” thresholds) are highlighted with stronger colors, making true surges pop visually.
Configurable Visualization:
Choose to view today’s volume as columns, histogram, or line—whatever fits your workflow best.
Average Volume Overlay:
Plots the rolling intraday average as a reference line, so you can see at a glance what’s “normal” for any bar in the session.
Extreme Event Marker:
Optional marker flags bars that cross your “Extreme” volume threshold.
How It Works
For each bar, the script calculates the average volume at this exact time using your selected number of previous days (e.g., 5 days).
Today’s volume is compared to this average:
If volume exceeds your “Large” threshold (e.g., 1.5× average), the bar is colored with a more intense highlight.
If volume exceeds your “Extreme” threshold (e.g., 2× average), the bar is colored with the strongest highlight and optionally flagged with a marker.
Separate color controls for up and down candles let you instantly see whether surging volume is driven by buyers or sellers.
Typical Uses
Spotting Breakouts:
Quickly identify bars where volume is truly unusual for the time of day—filtering out routine open/close surges and focusing on real-time activity.
Scalping & Day Trading:
Use threshold-based color alerts to time entries or exits, especially when sudden volume accompanies price moves.
Volume-Based Confirmation:
Validate signals from other indicators by requiring confirmation from large or extreme relative volume.
Parameters
Number of Past Days for Average: How many previous days to use for the time-matched average.
Large / Extreme Thresholds: Customize what constitutes a notable or extreme volume event, as multiples of the average.
Up/Down & Highlight Colors: Choose your preferred colors for all volume and threshold levels.
Display Style: Select columns, histogram, or line to match your charting style.
Why Use This Indicator?
Most “relative volume” tools compare only to simple session averages, which miss the real ebb and flow of intraday trading. Relative Volume Pulse gives you contextually accurate volume analysis—helping you spot the bars that matter, not just those that look big on paper.
Stop guessing what’s “high” volume—see it, and act on it.
WT + Stoch RSI Reversal Combo📊MR.Z RSI : WT + Stochastic RSI Reversal Combo
This custom indicator combines WaveTrend oscillator and Stochastic RSI to detect high-confidence market reversal points, filtering signals so they only appear when both indicators align.
🔍 Core Components:
✅ WaveTrend Oscillator
Based on smoothed deviation from EMA (similar to TCI logic)
Plots:
WT1 (main line)
WT2 (signal line = SMA of WT1)
Uses overbought/oversold thresholds (default: ±53) to filter signals
✅ Stochastic RSI
Momentum oscillator based on RSI's stochastic value
Plots:
%K: smoothed Stoch of RSI
%D: smoothed version of %K
Adjustable oversold/overbought thresholds (default: 20/80)
🔁 Combined Reversal Signal Logic:
🔼 Buy Signal
WT1 crosses above WT2 below WT oversold level (e.g., -53)
%K crosses above %D below Stoch RSI oversold level (e.g., 20)
🔽 Sell Signal
WT1 crosses below WT2 above WT overbought level (e.g., 53)
%K crosses below %D above Stoch RSI overbought level (e.g., 80)
🔔 Signals are only plotted and alerted if both conditions are true.
📌 Features:
Toggle on/off:
WaveTrend lines and histogram
Stochastic RSI
Combined Buy/Sell signals
Horizontal reference lines (±100, OB/OS)
Fully customizable smoothing lengths and thresholds
Signal plots:
✅ Green up-triangle = Combo Buy
✅ Red down-triangle = Combo Sell
Optional: Circle/cross markers for WT-only and Stoch-only signals
🔔 Built-in alerts for Buy/Sell signals
📈 Use Cases:
Reversal Trading: Wait for both indicators to confirm momentum shift
Entry Filter: Use in combination with trend indicators (like EMA)
Scalping or Swing: Works on intraday and higher timeframes