Bollinger Band Squeeze (5%)This identifies and highlights, within the Bollinger Bands, a squeeze of 5% or less.
Thank you Chat GPT
Indicators and strategies
UT Bot Strategy Backtest with Date RangeBacktesting Strategy for UT Bot Alerts by QuantNomad
• Preferred Settings: Heikin Ashi candles, 15m chart length, January 1, 2025 to current date, Key value: 1, ATR: 10, Order size: 50% of equity, Recalculation and order filling unchecked.
• Most Profitable Token: FARTCOIN using above settings.
Position Size Calculator with Auto SymbolPosition sizing
Position Size = (Account × Risk%) ÷ (Stop Distance × $ Per Point)
Trump/Biden Market RegimesHave you ever wondered if it's Trump's stock market (up) or Biden's stock market (down)? Think no more!
Moving Average with Proximity ColorThis plots the 5 SMA and changes color based on the following:
Default: Orange
Price close to SMA by Percent: Green
SMA flattening based on threshold: Red
Moomoo DB-DC SignalPerry shared...
This custom indicator is a trend-following signal system that uses weighted price averages to detect momentum shifts and generate buy/sell signals. It was originally written for the Moomoo platform and has been adapted here for TradingView using Pine Script.
ICT Intraday FrameworkAutomating The Basics Of ICT Intraday Concepts:
NWOG/NDOG
-from 4:14pm to 9:29am a line will be drawn from 4:14pm close to anticipate ndog/nwog
-once 9:30am or later NDOG/NWOG is drawn with High, Mid, and Low prices
-has option to extend High, Mid, and Low price lines until start of new day at 2/3pm
First Presented Imbalance
-draws fp imb from 9:30-10am
-has option to extend High, Mid, and Low price lines until start of new day at 2/3pm
Custom Macro Window
-draw box around high and low of macro
-first presented imbalance of macro window
Future concepts im planning to add:
Asia BSL/SSL Highlight
8:15 AM 15-min Candle Box on 5-min Chart with TP and SLThe “8:15 AM 15-min Candle Box on 5-min Chart with TP and SL” indicator is a custom-built Pine Script tool for breakout trading strategies, particularly tailored for assets like NASDAQ Futures (NAS100) during the U.S. market pre-open.
🔍 What It Does:
Tracks the 8:15–8:30 AM Central Time (CDT) Candle:
It marks the high and low of the 15-minute candle that starts at 8:15 AM (CDT).
The box visually outlines this price range.
Draws a Breakout Box:
At 8:30 AM, a box is drawn from the 8:15 candle’s high and low.
The box stretches forward 8 hours into the session, helping you visualize price interaction with that range.
Detects Breakouts:
If the price closes above the high, it signals a buy breakout.
If it closes below the low, it signals a sell breakout.
Automatically Calculates TP and SL:
Take Profit (TP): 50 pips from the breakout level in the direction of the trade.
Stop Loss (SL): 40 pips in the opposite direction.
Pips are calculated using the symbol’s minimum tick size.
Color Feedback:
Box turns green on a buy breakout, red on a sell breakout.
If TP is reached, the box turns black.
If SL is hit, the box turns purple.
🧠 Why Use This Indicator:
Perfect for pre-market breakout traders who want a visual confirmation of price action around the U.S. market open.
Provides a clear entry range, trade direction, and risk/reward visual cue.
No manual drawing — everything is automated daily based on reliable timing.
Would you like a version with alerts or plotted TP/SL lines as well?
BLCKBOX Buying / Selling SentimentThis indicator attempts to predict buying and selling sentiment. It may help?
Tripple Cross Indicator Description:
Triple Cross Indicator is a custom TradingView indicator designed to identify and visualize key EMA crossover signals directly on the chart. It plots three exponential moving averages (EMA 20, EMA 50, EMA 200) and highlights four critical events:
Golden Cross 20/50: EMA 20 crossing above EMA 50 → shown as a yellow diamond below the candle.
Golden Cross 50/200: EMA 50 crossing above EMA 200 → shown as a blue diamond below the candle.
Death Cross 20/50: EMA 20 crossing below EMA 50 → shown as a fuchsia X below the candle.
Death Cross 50/200: EMA 50 crossing below EMA 200 → shown as a red X below the candle.
Alerts are automatically triggered for each crossover event so traders can be notified in real-time without constantly watching the chart.
This indicator provides a clear, simple visualization of trend shifts based on moving average crossovers, useful for swing traders, day traders, or anyone monitoring trend momentum.
⚠️ Disclaimer:
This indicator is for educational and informational purposes only and does not constitute financial advice or a recommendation to buy or sell any security or financial instrument. Trading financial markets involves risk, and past performance is not indicative of future results. Users should conduct their own research and consult with a qualified financial advisor before making trading decisions. The creator of this script is not liable for any financial losses or decisions made based on this indicator.
BLCKBOX Crypto Bear Market PredicationMy First Indicator!
This indicator was developed in an attempt to predict a crypto bear market and global recession. It's a really simple plugin-in that reads GDP information from major countries, plots them in a chart and calculates the lowest values month on month. When a -1 is detected in the chart a red indicator is displayed on the indicator at the bottom of the window warning of a potential future downward trend for crypto markets.
Let me know how you get on. The indicator doesn't work with normal stock markets but there does seem to be a correlation with crypto markets.
AL-SAT Sinyali (Dip AL + Heikin Ashi)Buy: Combines RSI, MACD, volume, and trend signals
Sell: RSI>70 + MACD cross down
Target: Auto 10% line, profit shown
Dip Buy: RSI<30 + dip zone + HA bullish
Note: Use with context; HA may delay signals.
200 Trading Day High Volume//@version=5
indicator("200 Trading Day High Volume", overlay=true)
// Define lookback period (200 trading days)
lookback = 200
// Get highest volume in the last 200 bars (excluding current bar)
highest_vol = ta.highest(volume , lookback)
// Check if today's volume is higher than the previous 200 days
is_highest_today = volume > highest_vol
// Plot signal on chart below the bar when today's volume is the highest in 200 days
plotshape(is_highest_today, title="Highest Volume in 200 Days", location=location.belowbar, color=color.red, style=shape.labelup, text="200D High Vol")
// Optional: Display volume on chart as columns (uncomment if needed)
// plot(volume, title="Volume", color=color.gray, style=plot.style_columns)
C&B Auto MK5C&B Auto MK5.2ema BullBear
Overview
The C&B Auto MK5.2ema BullBear is a versatile Pine Script indicator designed to help traders identify bullish and bearish market conditions across various timeframes. It combines Exponential Moving Averages (EMAs), Relative Strength Index (RSI), Average True Range (ATR), and customizable time filters to generate actionable signals. The indicator overlays on the price chart, displaying EMAs, a dynamic cloud, scaled RSI levels, bull/bear signals, and market condition labels, making it suitable for swing trading, day trading, or scalping in trending or volatile markets.
What It Does
This indicator generates bull and bear signals based on the interaction of two EMAs, filtered by RSI thresholds, ATR-based volatility, a 50/200 EMA trend filter, and user-defined time windows. It adapts to market volatility by adjusting EMA lengths and RSI thresholds. A dynamic cloud highlights trend direction or neutral zones, with candlestick coloring in neutral conditions. Market condition labels (current and historical) provide real-time trend and volatility context, displayed above the chart.
How It Works
The indicator uses the following components:
EMAs: Two EMAs (short and long) are calculated on a user-selected timeframe (1, 5, 15, 30, or 60 minutes). Their crossover or crossunder triggers potential bull/bear signals. EMA lengths adjust based on volatility (e.g., 10/20 for volatile markets, 5/10 for non-volatile).
Dynamic Cloud: The area between the EMAs forms a cloud, colored green for bullish trends, red for bearish trends, or a user-defined color (default yellow) for neutral zones (when EMAs are close, determined by an ATR-based threshold). Users can widen the cloud for visibility.
RSI Filter: RSI is scaled to price levels and plotted on the chart (optional). Signals are filtered to ensure RSI is within volatility-adjusted bull/bear thresholds and not in overbought/oversold zones.
ATR Volatility Filter: An optional filter ensures signals occur during sufficient volatility (ATR(14) > SMA(ATR, 20)).
50/200 EMA Trend Filter: An optional filter restricts bull signals to bullish trends (50 EMA > 200 EMA) and bear signals to bearish trends (50 EMA < 200 EMA).
Time Filter: Signals are restricted to a user-defined UTC time window (default 9:00–15:00), aligning with active trading sessions.
Market Condition Labels: Labels above the chart display the current trend (Bullish, Bearish, Neutral) and optionally volatility (e.g., “Bullish Volatile”). Up to two historical labels persist for a user-defined number of bars (default 5) to show recent trend changes.
Visual Aids: Bull signals appear as green triangles/labels below the bar, bear signals as red triangles/labels above. Candlesticks in neutral zones are colored (default yellow).
The indicator ensures compatibility with standard chart types (e.g., candlestick or bar charts) to produce realistic signals, avoiding non-standard types like Heikin Ashi or Renko.
How to Use It
Add to Chart: Apply the indicator to a candlestick or bar chart on TradingView.
Configure Settings:
Timeframe: Choose a timeframe (1, 5, 15, 30, or 60 minutes) to match your trading style.
Filters:
Enable/disable the ATR volatility filter to focus on high-volatility periods.
Enable/disable the 50/200 EMA trend filter to align signals with the broader trend.
Enable the time filter and set custom UTC hours/minutes (default 9:00–15:00).
Cloud Settings: Adjust the cloud width, neutral zone threshold, color, and transparency.
EMA Colors: Use default trend-based colors or set custom colors for short/long EMAs.
RSI Display: Toggle the scaled RSI and its thresholds, with customizable colors.
Signal Settings: Toggle bull/bear labels and set signal colors.
Market Condition Labels: Toggle current/historical labels, include/exclude volatility, and adjust decay period.
Interpret Signals:
Bull Signal: A green triangle or “Bull” label below the bar indicates potential bullish momentum (EMA crossover, RSI above bull threshold, within time window, passing filters).
Bear Signal: A red triangle or “Bear” label above the bar indicates potential bearish momentum (EMA crossunder, RSI below bear threshold, within time window, passing filters).
Neutral Zone: Yellow candlesticks and cloud (if enabled) suggest a lack of clear trend; consider range-bound strategies or avoid trading.
Market Condition Labels: Check labels above the chart for real-time trend (Bullish, Bearish, Neutral) and volatility status to confirm market context.
Monitor Context: Use the cloud, RSI, and labels to assess trend strength and volatility before acting on signals.
Unique Features
Volatility-Adaptive EMAs: Automatically adjusts EMA lengths based on ATR to suit volatile or non-volatile markets, reducing manual configuration.
Neutral Zone Detection: Uses an ATR-based threshold to identify low-trend periods, helping traders avoid choppy markets.
Scaled RSI Visualization: Plots RSI and thresholds directly on the price chart, simplifying momentum analysis relative to price.
Flexible Time Filtering: Supports precise UTC-based trading windows, ideal for day traders targeting specific sessions.
Historical Market Labels: Displays recent trend changes (up to two) with a decay period, providing context for market shifts.
50/200 EMA Trend Filter: Aligns signals with the broader market trend, enhancing signal reliability.
Notes
Use on standard candlestick or bar charts to ensure accurate signals.
Test the indicator on a demo account to optimize settings for your market and timeframe.
Combine with other analysis (e.g., support/resistance, volume) for better decision-making.
The indicator is not a standalone system; use it as part of a broader trading strategy.
Limitations
Signals may lag in fast-moving markets due to EMA-based calculations.
Neutral zone detection may vary in extremely volatile or illiquid markets.
Time filters are UTC-based; ensure your platform’s timezone settings align.
This indicator is designed for traders seeking a customizable, trend-following tool that adapts to volatility and provides clear visual cues with robust filtering for bullish and bearish market conditions.
AlphaTrend++AlphaTrend++
Overview
The AlphaTrend++ is an advanced Pine Script indicator designed to help traders identify buy and sell opportunities in trending and volatile markets. Building on trend-following principles, it uses a modified Average True Range (ATR) calculation combined with volume or momentum data to plot a dynamic trend line. The indicator overlays on the price chart, displaying a colored trend line, a filled trend zone, buy/sell signals, and optional stop-loss tick labels, making it ideal for day trading or swing trading, particularly in markets like futures (e.g., MES).
What It Does
This indicator generates buy and sell signals based on the direction and momentum of a custom trend line, filtered by optional time restrictions and signal frequency logic. The trend line adapts to price action and volatility, with a filled zone highlighting trend strength. Buy/sell signals are plotted as labels, and stop-loss distances are displayed in ticks (customizable for instruments like MES). The indicator supports standard chart types for realistic signal generation.
How It Works
The indicator employs the following components:
Trend Line Calculation: A dynamic trend line is calculated using ATR adjusted by a user-defined multiplier, combined with either Money Flow Index (MFI) or Relative Strength Index (RSI) depending on volume availability. The line tracks price movements, adjusting upward or downward based on trend direction and volatility.
Trend Zone: The area between the current trend line and its value two bars prior is filled, colored green for bullish trends (upward movement) or red for bearish trends (downward movement), providing a visual cue of trend strength.
Signal Generation: Buy signals occur when the trend line crosses above its value two bars ago, and sell signals occur when it crosses below, with optional filtering to reduce signal noise (based on bar timing logic). Signals can be restricted to a 9:00–15:00 UTC trading window.
Stop-Loss Ticks: For each signal, the indicator calculates the distance to the trend line (acting as a stop-loss level) in ticks, using a user-defined tick size (default 0.25 for MES). These are displayed as labels below/above the signal.
Time Filter: An optional filter limits signals to 9:00–15:00 UTC, aligning with active trading sessions like the US market open.
The indicator ensures compatibility with standard chart types (e.g., candlestick or bar charts) to avoid unrealistic results associated with non-standard types like Heikin Ashi or Renko.
How to Use It
Add to Chart: Apply the indicator to a candlestick or bar chart on TradingView.
Configure Settings:
Multiplier: Adjust the ATR multiplier (default 1.0) to control trend line sensitivity. Higher values widen the stop-loss distance.
Common Period: Set the ATR and MFI/RSI period (default 14) for trend calculations.
No Volume Data: Enable if volume data is unavailable (e.g., for certain forex pairs), switching from MFI to RSI.
Tick Size: Set the tick size for stop-loss calculations (default 0.25 for MES futures).
Show Buy/Sell Signals: Toggle signal labels (default enabled).
Show Stop Loss Ticks: Toggle stop-loss tick labels (default enabled).
Use Time Filter: Restrict signals to 9:00–15:00 UTC (default disabled).
Use Filtered Signals: Enable to reduce signal frequency using bar timing logic (default enabled).
Interpret Signals:
Buy Signal: A blue “BUY” label below the bar indicates a potential long entry (trend line crossover, passing filters).
Sell Signal: A red “SELL” label above the bar indicates a potential short entry (trend line crossunder, passing filters).
Trend Zone: Green fill suggests bullish momentum; red fill suggests bearish momentum.
Stop-Loss Ticks: Gray labels show the stop-loss distance in ticks, helping with risk management.
Monitor Context: Use the trend line and filled zone to confirm the market’s direction before acting on signals.
Unique Features
Adaptive Trend Line: Combines ATR with MFI or RSI to create a responsive trend line that adjusts to volatility and market conditions.
Tick-Based Stop-Loss: Displays stop-loss distances in ticks, customizable for specific instruments, aiding precise risk management.
Signal Filtering: Optional bar timing logic reduces false signals, improving reliability in choppy markets.
Trend Zone Visualization: The filled zone between trend line values enhances trend clarity, making it easier to assess momentum.
Time-Restricted Trading: Optional 9:00–15:00 UTC filter aligns signals with high-liquidity sessions.
Notes
Use on standard candlestick or bar charts to ensure accurate signals.
Test the indicator on a demo account to optimize settings for your market and timeframe.
Combine with other analysis (e.g., support/resistance, volume spikes) for better decision-making.
The indicator is not a standalone system; use it as part of a broader trading strategy.
Limitations
Signals may lag in highly volatile or low-liquidity markets due to ATR-based calculations.
The 9:00–15:00 UTC time filter may not suit all markets; disable it for 24-hour assets like forex or crypto.
Stop-loss tick calculations assume consistent tick sizes; verify compatibility with your instrument.
This indicator is designed for traders seeking a robust, trend-following tool with customizable risk management and signal filtering, optimized for active trading sessions.
Simple Spread Viewer (con texto)Indica spread con numeros, en tiempo real. Ademas lo marca tambien con un grafico
Adaptive Freedom Machine w/labelsAdaptive Freedom Machine w/ Labels
Overview
The Adaptive Freedom Machine w/ Labels is a versatile Pine Script indicator designed to assist traders in identifying buy and sell opportunities across various market conditions (trending, ranging, or volatile). It combines Exponential Moving Averages (EMAs), Relative Strength Index (RSI), Average True Range (ATR), and customizable time filters to generate actionable signals. The indicator overlays on the price chart, displaying EMAs, a dynamic cloud, scaled RSI levels, buy/sell signals, and market condition labels, making it suitable for swing trading, day trading, or scalping.
What It Does
This indicator generates buy and sell signals based on the interaction of two EMAs, filtered by RSI thresholds, ATR-based volatility, and user-defined time windows. It adapts to the selected market condition by adjusting EMA lengths, RSI thresholds, and trading hours. A dynamic cloud highlights trend direction or neutral zones, and candlestick bodies are colored in neutral conditions for clarity. A table displays real-time trend and volatility status.
How It Works
The indicator uses the following components:
EMAs: Two EMAs (short and long) are calculated on a user-selected timeframe (1, 5, 15, 30, or 60 minutes). Their crossover or crossunder generates potential buy/sell signals, with lengths adjusted based on the market condition (e.g., longer EMAs for trending markets, shorter for ranging).
Dynamic Cloud: The area between the EMAs forms a cloud, colored green for uptrends, red for downtrends, or a user-defined color (default yellow) for neutral zones (when EMAs are close, determined by an ATR-based threshold). Users can widen the cloud for visibility.
RSI Filter: RSI is scaled to price levels and plotted on the chart (optional). Signals are filtered to ensure RSI is within user-defined buy/sell thresholds and not in overbought/oversold zones, with thresholds tailored to the market condition.
ATR Volatility Filter: An optional filter ensures signals occur during sufficient volatility (ATR(14) > SMA(ATR, 20)).
Time Filter: Signals are restricted to a user-defined or market-specific time window (e.g., 10:00–15:00 UTC for volatile markets), with an option for custom hours.
Visual Aids: Buy/sell signals appear as green triangles (buy) or red triangles (sell). Candlesticks in neutral zones are colored (default yellow). A table in the top-right corner shows the current trend (Uptrend, Downtrend, Neutral) and volatility (High or Low).
The indicator ensures compatibility with standard chart types (e.g., candlestick charts) to produce realistic signals, avoiding non-standard types like Heikin Ashi or Renko.
How to Use It
Add to Chart: Apply the indicator to a candlestick or bar chart on TradingView.
Configure Settings:
Timeframe: Choose a timeframe (1, 5, 15, 30, or 60 minutes) to align with your trading style.
Market Condition: Select one market condition (Trending, Ranging, or Volatile). Volatile is the default if none is selected. Only one condition can be active.
Filters:
Enable/disable the ATR volatility filter to trade only in high-volatility periods.
Enable the time filter and choose default hours (specific to the market condition) or set custom UTC hours.
Cloud Settings: Adjust the cloud width, neutral zone threshold, and color. Enable/disable the neutral cloud.
RSI Display: Toggle the scaled RSI and its thresholds on the chart.
Interpret Signals:
Buy Signal: A green triangle below the bar indicates a potential long entry (EMA crossover, RSI above buy threshold, within time window, and passing volatility filter).
Sell Signal: A red triangle above the bar indicates a potential short entry (EMA crossunder, RSI below sell threshold, within time window, and passing volatility filter).
Neutral Zone: Yellow candlesticks and cloud (if enabled) suggest a lack of clear trend; avoid trading or use for range-bound strategies.
Monitor the Table: Check the top-right table for real-time trend (Uptrend, Downtrend, Neutral) and volatility (High or Low) to confirm market context.
Unique Features
Adaptive Parameters: Automatically adjusts EMA lengths, RSI thresholds, and trading hours based on the selected market condition, reducing manual tweaking.
Neutral Zone Detection: Uses an ATR-based threshold to identify low-trend periods, helping traders avoid choppy markets.
Scaled RSI Visualization: Plots RSI and thresholds directly on the price chart, making it easier to assess momentum relative to price action.
Flexible Time Filtering: Supports both default and custom UTC-based trading windows, ideal for day traders targeting specific sessions.
Dynamic Cloud: Enhances trend visualization with customizable width and neutral zone coloring, improving readability.
Notes
Use on standard candlestick or bar charts to ensure realistic signals.
Test the indicator on a demo account to understand its behavior in your chosen market and timeframe.
Adjust settings to match your trading strategy, but avoid over-optimizing for past data.
The indicator is not a standalone system; combine it with other analysis (e.g., support/resistance, news events) for better results.
Limitations
Signals may lag in fast-moving markets due to EMA-based calculations.
Neutral zone detection may vary in extremely volatile or illiquid markets.
Time filters are UTC-based; ensure your platform’s timezone settings align.
This indicator is designed for traders seeking a customizable, trend-following tool that adapts to different market environments while providing clear visual cues and robust filtering.
RSI(7) Divergence @10/90 + AlertsThis indicator indicates the divergences on the chart with a sell and buy signal
MTF VEGASThe MTF Tunnel Vegas indicator is a multi-timeframe (MTF) technical analysis tool designed to help traders identify trends and key price zones. It is based on the Vegas Tunnel system, which uses three key exponential moving averages (EMAs) — the 144, 169, and 233-period EMAs — to create a dynamic tunnel or channel on the price chart.
The purpose of this tunnel is to highlight zones where price may react, either as support/resistance or as breakout levels. When price approaches, bounces off, or crosses the tunnel, it can signal potential trading opportunities, whether for continuation or reversal setups.
The MTF component means that the indicator overlays the tunnel from a higher timeframe directly onto the current chart, giving traders a clear view of the larger trend context without needing to switch between multiple charts. This allows for better alignment of short-term decisions with long-term trend dynamics.
Key features:
✅ Plots 144, 169, and 233-period EMA tunnels from higher timeframes
✅ Highlights dynamic zones of support and resistance
✅ Helps traders stay aligned with the dominant trend
✅ Reduces chart noise and improves trade filtering
CUSTOM PRO RANGE V2.0 with AlertsCore Functions
Tracks High/Low Ranges
Daily (DR) or Initial (IDR) ranges within custom time windows (e.g., 9:30 AM–4:00 PM).
Optional extended hours (e.g., overnight).
Visual Tools
Draws boxes/lines for range boundaries, midpoints, and opening prices.
Custom colors/styles for clarity.
Smart Alerts
Notifies when price breaks high/low/mid of the range.
Avoids spam with once-per-bar alerts.
Flexible Timeframes
Works for intraday, daily, or even quarterly ranges with minor tweaks.
🎯 Who It Helps
Day Traders: Spot breakouts/reversals.
Swing Traders: Identify key support/resistance.
Analysts: Study price behavior in specific sessions.
Buy/Sell Signal Indikator (EMA + StochRSI + Volumen) v3This buy and sell indicator works with the EMA 20, EMA 50, EMA 200, Stochastic RSI, Vol and Vol MA indicators in the background and is primarily intended for scalping trading on the 1-minute timeframe.
Buy Signal: EMA 50 is above EMA 200 + EMA 20 is above EMA 50 + Stochastic RSI is below 15 + Vol is at least 15% above Vol MA + Current price is within 0.2% of EMA 50 + Between 2:00 AM and 1:30 PM (UTC-4 NYC)
Sell Signal : EMA 50 is below EMA 200 + EMA 20 is below EMA 50 + Stochastic RSI is above 85 + Vol is at least 15% above Vol MA + Current price is within 0.2% of EMA 50 + Between 2:00 AM and 1:30 PM (UTC-4 NYC)
VWAP table with color
## 📊 VWAP Table with Color – Clear VWAP Deviation at a Glance
This script displays a **VWAP (Volume-Weighted Average Price)** table in a non-intrusive, color-coded panel on your chart. It helps you **quickly assess where the current price stands relative to VWAP**, classified into sigma bands (standard deviations). The goal is to provide valuable VWAP insight **without cluttering the chart with multiple lines**.
---
### 🔍 Purpose & Concept
VWAP is a powerful tool used by institutional traders to measure the average price an asset has traded at throughout the day, based on both volume and price.
In this script:
- We **do not plot traditional VWAP lines** with multiple ±1σ, ±2σ, etc., on the chart.
- Instead, we **summarize VWAP and its relative position in a table**, color-coded by deviation.
- This provides the **same information**, but in a **cleaner, minimal, and visually digestible format**.
---
### 🧠 VWAP Deviation Classification
The script calculates how far the current price is from the VWAP, in units of **standard deviation (σ)**.
The formula is:
```plaintext
VWAP Delta σ = (Current Price - VWAP) / Standard Deviation
```
This gives you a normalized value for deviation from VWAP, and it is **clamped between -3 and +3** to avoid extreme outliers.
Each range is color-coded and classified as:
| VWAP Δσ | Zone | Interpretation | Color |
|---------|---------------|------------------------------------------|--------------|
| -3σ | Far Below | Strongly below VWAP – potentially oversold | 🔴 Red |
| -2σ | Below | Below VWAP – bearish territory | 🟠 Orange |
| -1σ | Slightly Below| Slightly under VWAP – weak signal | 🟡 Yellow |
| 0σ | At VWAP | Price is around VWAP – neutral zone | ⚪ Gray |
| +1σ | Slightly Above| Slightly above VWAP – weak bullish | 🟢 Lime Green |
| +2σ | Above | Above VWAP – bullish signal | 🟢 Green |
| +3σ | Far Above | Strongly above VWAP – potentially overbought | 🟦 Teal |
This **compact summary in the table** provides a clear situational view while keeping the chart clean.
---
### ⚙️ User Customization
Users can configure:
- **VWAP σ Multiplier** (default 0.1) to set the width of the optional VWAP band on the chart.
- **Table Position** (Top Center, Bottom Right, etc.).
- **Text Size** and **Text Color**.
- **Hide VWAP logic**: VWAP data can be hidden automatically on higher timeframes (e.g., daily or weekly).
- **Enable/disable the VWAP ±σ band lines** (optional visual aid).
---
### 📐 Technical Highlights
- VWAP is recalculated each day using `ta.vwap(hlc3, isNewPeriod, 1)`.
- The band width uses standard deviation and the selected multiplier: `VWAP ± σ * multiplier`.
- Table updates dynamically with the new VWAP values each day.
- To **avoid floating-point rounding issues**, `vwapDelta` is rounded before comparison, ensuring correct background color display.
---
### ✅ Why Use This?
- Keeps your chart **visually clean and readable**.
- Gives **immediate context** to current price action relative to VWAP.
- Helps **discretionary traders** or **scalpers** decide whether price is stretched too far from the mean.
- Easier than tracking multiple σ bands manually.
---
### Example Usage:
- On intraday timeframes, you can identify price exhaustion as it hits ±2σ or ±3σ.
- On a 5-minute chart, if price touches `+3σ`, you may consider taking profits on longs.
- On reversal setups, watch for price at `-3σ` with bullish divergence.
---
### 🧩 Future Enhancements (Optional Ideas)
- Add alerts for when `vwapDelta` crosses thresholds like ±2σ or ±3σ.
- Let user select the timeframe for VWAP source (e.g., 1H, 5M, etc.).
- Extend to display VWAP on session or weekly basis.
---
Let me know if you want a version of this script formatted and cleaned up for direct TradingView publication (with annotations, credits, and formatting). Would you like that?