PROTECTED SOURCE SCRIPT
已更新 SC-MarketCondition (VWAP Based)

SC-MarketCondition (VWAP Context)
Automated Market Regime Classification
This indicator automatically classifies the current market environment into one of three regimes: Trending, Ranging, or Choppy. Instead of using lagging Moving Averages, this tool anchors its logic to the VWAP (Volume Weighted Average Price), acting as the "Fair Value" line, and uses Average True Range (ATR) to adjust for volatility.
Visualizing the market condition helps traders filter their strategies (e.g., taking breakouts only in "Trending" or fading extremes only in "Ranging").
How it Works & Reasoning
The indicator builds "Context Bands" around the VWAP (VWAP ± ATR * Multiplier). The relationship between price and these bands determines the condition:
1. TRENDING (Green Background)
Logic: Price closes outside the volatility bands (above Upper Band or below Lower Band).
Reasoning: The VWAP represents the average price paid by all traders in the session. When price pushes significantly away from this equilibrium (beyond normal volatility limits), it indicates a strong supply/demand imbalance. The market is "seeking value" elsewhere, characterizing a Trend.
2. CHOPPY (Red Background)
Logic: Price is crossing the VWAP line frequently (e.g., more than 2 times in the last 20 bars).
Reasoning: Frequent crossing of the mean indicates indecision. Neither buyers nor sellers are in control, and price is whipping back and forth through the fair value. This is the "Meat Grinder" zone where trend-following systems often get stopped out.
3. RANGING (Yellow Background)
Logic: Price is contained inside the bands but is not crossing the VWAP excessively.
Reasoning: The price is stable and respecting the fair value. It suggests a period of accumulation or distribution where the market is efficiently transacting near the mean. This is a "Value Building" phase, unlike the chaotic noise of a Choppy market.
Settings
ATR Length: Controls the sensitivity of the bands to volatility.
Trend Threshold: Multiplier to widen/narrow the bands. Higher values require stronger moves to trigger "Trend".
Choppy Lookback & Threshold: Defines how strictly the script defines "Chop" based on how often price crosses the VWAP.
Automated Market Regime Classification
This indicator automatically classifies the current market environment into one of three regimes: Trending, Ranging, or Choppy. Instead of using lagging Moving Averages, this tool anchors its logic to the VWAP (Volume Weighted Average Price), acting as the "Fair Value" line, and uses Average True Range (ATR) to adjust for volatility.
Visualizing the market condition helps traders filter their strategies (e.g., taking breakouts only in "Trending" or fading extremes only in "Ranging").
How it Works & Reasoning
The indicator builds "Context Bands" around the VWAP (VWAP ± ATR * Multiplier). The relationship between price and these bands determines the condition:
1. TRENDING (Green Background)
Logic: Price closes outside the volatility bands (above Upper Band or below Lower Band).
Reasoning: The VWAP represents the average price paid by all traders in the session. When price pushes significantly away from this equilibrium (beyond normal volatility limits), it indicates a strong supply/demand imbalance. The market is "seeking value" elsewhere, characterizing a Trend.
2. CHOPPY (Red Background)
Logic: Price is crossing the VWAP line frequently (e.g., more than 2 times in the last 20 bars).
Reasoning: Frequent crossing of the mean indicates indecision. Neither buyers nor sellers are in control, and price is whipping back and forth through the fair value. This is the "Meat Grinder" zone where trend-following systems often get stopped out.
3. RANGING (Yellow Background)
Logic: Price is contained inside the bands but is not crossing the VWAP excessively.
Reasoning: The price is stable and respecting the fair value. It suggests a period of accumulation or distribution where the market is efficiently transacting near the mean. This is a "Value Building" phase, unlike the chaotic noise of a Choppy market.
Settings
ATR Length: Controls the sensitivity of the bands to volatility.
Trend Threshold: Multiplier to widen/narrow the bands. Higher values require stronger moves to trigger "Trend".
Choppy Lookback & Threshold: Defines how strictly the script defines "Chop" based on how often price crosses the VWAP.
版本注释
SC-MarketCondition (Multi-Session VWAP Context)Automated Market Regime Classification with Configurable VWAP Anchors
This indicator automatically classifies the current market environment into one of three regimes: Trending, Ranging, or Choppy. It leverages a configurable VWAP (Volume Weighted Average Price) as the "Fair Value" baseline and uses dynamic ATR Bands to gauge volatility.
Unlike standard indicators, this tool allows you to anchor the analysis to specific trading sessions (Asia, London, New York) or longer timeframes (Day, Week, Month), making it adaptable for both scalpers and swing traders.
Key Features
Three Market Regimes: Instantly see if the market is Directional (Trending), Accumulating (Ranging), or Indecisive (Choppy).
Configurable Anchors: Reset the VWAP calculation at the start of major sessions (Asia, London, NY) or standard periods (Day, Week, Month).
Visual Backgrounds: Color-coded background signals allow for rapid decision-making without cluttering the charts.
How it Works
The indicator builds "Context Bands" around the selected VWAP (VWAP ± ATR * Multiplier).
1. TRENDING (Green Background)
Logic: Price closes outside the volatility bands.
Meaning: The market has broken away from the average price of the session/period. Buyers or Sellers are aggressive, pushing price into "Unfair Value" to find new liquidity.
2. CHOPPY (Red Background)
Logic: Price crosses the VWAP line frequently (e.g., >2 times in recent bars).
Meaning: The market is confused. Price is whipping back and forth through the mean with no clear direction. This is a danger zone for trend-following strategies.
3. RANGING (Yellow Background)
Logic: Price is contained inside the bands but is not chopping excessively.
Meaning: The market is stable and transacting efficiently near the fair value. This environment favors mean-reversion strategies or waiting for a breakout.
Settings
VWAP Anchor Period: Choose between Asia Session, London Session, New York Session, Day, Week, or Month.
ATR Length: Adjusts the sensitivity of the bands to recent volatility.
Trend Threshold: A multiplier that widens or narrows the bands.
Choppy Lookback: How far back to check for VWAP crosses to determine choppiness.
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。