OPEN-SOURCE SCRIPT
更新済

VWAP [cryptalent]

619
VWAP Indicator with Adjustable Source

Overview
This TradingView indicator calculates Daily, Weekly, and Monthly VWAP (Volume Weighted Average Price) with the flexibility to select different price sources (Open, High, Low, Close, HLC3, etc.). It also displays previous period VWAP levels, helping traders analyze past liquidity zones.

Key Features:
✅ Adjustable Source – Users can choose the price used for VWAP calculations (e.g., Close, High, Low, Open).
✅ Multi-Timeframe VWAP – Tracks Daily, Weekly, and Monthly VWAP to provide a broader market view.
✅ Historical VWAP Levels – Displays previous VWAP values for comparison and reference.
✅ Step Line Style – Ensures clear distinction between different periods and prevents overlapping.
✅ Visible in the Price Scale – The latest and historical VWAP values are displayed in the right-hand price scale for easy reference.

Customization:
You can easily modify the input settings to match your trading style.
Adjust the VWAP source price to test different perspectives (e.g., Open vs. High vs. Close).
リリースノート
Optimized alert options
リリースノート
📋 Feature Description for TradingView PublicationVWAP Touch Alert SystemThis indicator now includes an advanced D/W/M VWAP Touch Alert System with intelligent cooldown mechanism to prevent alert fatigue.✨ Key Features1. VWAP Touch Detection

Triggers when price touches Daily, Weekly, or Monthly VWAP levels
Detects touch via candlestick's High/Low range (includes both body and wicks)
Separate alerts for each timeframe (D/W/M)
2. Smart Cooldown Mechanism

One alert per bar - prevents multiple alerts on the same candle
Independent cooldown tracking for each VWAP period
Next alert only triggers on a new completed bar
3. Flexible Alert Configuration

Individual toggles for D/W/M touch alerts
Combined alert option: "Any D/W/M VWAP Touch"
Full integration with existing Cross and Std Dev Band alerts
🔔 Alert SettingsTouch Alerts - D/W/M

Daily VWAP Touch Alert - Alert when price touches Daily VWAP (max once per bar)
Weekly VWAP Touch Alert - Alert when price touches Weekly VWAP (max once per bar)
Monthly VWAP Touch Alert - Alert when price touches Monthly VWAP (max once per bar)
Combined Alerts

Any D/W/M VWAP Touch - Triggers on any D/W/M VWAP touch event
Any VWAP Pro Signal - Master alert including all Cross, Touch, and Std Dev events
📖 How to UseStep 1: Enable Desired Alerts
Navigate to indicator settings → "Touch Alerts - D/W/M" group → Enable your preferred alertsStep 2: Create Alert in TradingView

Click "Add Alert" on the chart
Select from available alert conditions:

Individual: Daily VWAP Touch, Weekly VWAP Touch, Monthly VWAP Touch
Combined: Any D/W/M VWAP Touch


Configure notification settings (email, webhook, push notification)
Step 3: Alert Message Format
Touch alerts display with 🎯 emoji for easy identification:
🎯 Daily VWAP Touch | Price: 43250.50
🎯 Weekly VWAP Touch | Price: 43250.50⚙️ Technical ImplementationTouch Detection Logic:
Touch Condition = (Low <= VWAP) AND (High >= VWAP) AND (VWAP is valid)Cooldown Mechanism:

Tracks bar_index of last alert trigger for each period
Alert only fires when current_bar_index ≠ last_triggered_bar_index
Prevents duplicate alerts on rapid price oscillations around VWAP
Performance:

Uses var keyword for efficient state management
Minimal computational overhead
Works seamlessly across all timeframes (1m to 1D+)
🎯 Use Cases
Mean Reversion Trading - Alert when price returns to VWAP anchors
Breakout Confirmation - Monitor when price respects or rejects key VWAP levels
Multi-Timeframe Analysis - Track D/W/M VWAP touches simultaneously
Risk Management - Use VWAP touches as dynamic support/resistance zones
📌 Notes
Touch alerts are additive to existing Cross alerts (both can be enabled simultaneously)
Cooldown prevents alert spam while maintaining high sensitivity
Each VWAP period (D/W/M) has independent cooldown tracking
Compatible with all alert delivery methods (app, email, webhook)
🔄 Version Historyv2.0 - VWAP Touch Alerts

Added D/W/M VWAP touch detection
Implemented per-bar cooldown mechanism
Enhanced alert message system with touch events
Added 4 new alertcondition() entries for TradingView alert panel

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。