PROTECTED SOURCE SCRIPT
量价策略信号+K线pinbar+波动率出场+市场结构【梦喂马】v3

Part 1: Indicator Module Explained (Code Analysis and Function Description)
Module 1: Master Switches
This is your "dashboard master control." Due to the numerous indicator functions, charts can appear cluttered. Here, you can easily turn each major function module on or off, allowing you to focus on the information you need most.
- Suggested Usage: When using it for the first time, you can start by only turning on the Vegas Channel and Core Entry Signals to familiarize yourself with the system's main trend judgment and entry logic. Then gradually turn on other modules to experience how they work together.
Module 2: Core Entry Signals (Long/Short Signals)
This is the "engine" of the entire system, responsible for generating the highest quality trend-following trading signals. The appearance of a "long" or "short" signal represents the resonance of multiple indicators, satisfying extremely stringent filtering conditions:
- 1. Vegas Channel Filtering:
- When going long, the price must be above the slow channel (576/676 EMA) and the fast channel (21/55 EMA).
- When shorting, the price must break below both the slow and fast channels.
- Interpretation: This ensures your trading direction is perfectly aligned with the medium- to long-term macro trend.
- 2. Alligator Line Confirmation:
- When going long, the price must be above the alligator lines (lips, teeth, jaws), and the alligator lines must be in a bullish alignment (opening upwards).
- When shorting, the opposite applies.
- Interpretation: This confirms that short-term momentum aligns with the long-term trend, avoiding hasty entry at the start or end of a trend.
- 3. OBV (On-Balance Volume) Filter:
- When going long, the OBV value must be above its own moving average (default 34 periods).
- When shorting, the OBV value must be below its moving average.
- Interpretation: OBV is a key indicator measuring fund inflows and outflows. This condition ensures that trading volume (funds) is supporting your trading direction.
- 4. ADX Trend Strength Filter:
- Whether going long or short, the ADX value must be greater than the set threshold (default 20).
- Interpretation: This is a crucial "insurance" layer. It helps filter out volatile market conditions with no clear direction, prone to repeated "misjudgments." We only act in markets with clear and strong trends.
Core Usage: Once a "long"/"short" signal appears, it represents a high-certainty trend-following trading opportunity. Due to the very strict nature of the signals, they appear infrequently, but each one deserves your close attention.
Module Three: Vegas Channel & Alligator Line (Trend Judgment Tool)
- Vegas Channel: Composed of two sets of EMAs.
- Slow Channel (576/676): Your "bull/bear dividing line." Above this line, only consider going long; below this line, only consider going short. It is your strategic compass.
- Fast Channel (21/55): Your "short-term momentum line." In an uptrend, price pullbacks to the vicinity of the fast channel are potential areas for adding to positions or entering.
- Alligator Line:
- Widening divergence: Indicates that a trend is underway.
- Convergence/Entanglement: Indicates the market is dormant or consolidating.
- Interpretation: Alligator lines allow you to visually see whether the market is in a "trending" or "consolidating" state. We primarily trade when the alligator lines widen.
Module Four: R/C Volume-Price Signals (Refined Entry/Warning Signals)
This is the system's "special forces," specifically designed to identify abnormal volume and price movements on key candlesticks. It is divided into the R series (Reversal) and the C series (Continuation).
- Prerequisites: All signals are based on trading volume. A signal's appearance must be accompanied by a significantly higher-than-average trading volume (increased volume). This indicates large capital participation at that price level, making the signal more reliable.
- R Series - Trend Reversal Signals (Warning/Opportunity):
- R1 (Core Reversal): In a downtrend, a sudden increase in volume on a bullish candlestick; or in an uptrend, an increase in volume on a bearish candlestick.
- Interpretation: This is the most basic reversal warning signal. It tells you that counter-trend forces are emerging, but it doesn't mean the trend will immediately reverse. Confirmation needs to be combined with other signals.
- R2 (Pattern Confirmation): In addition to R1, this candlestick must also be a well-defined Pin Bar (a bullish Pin Bar with a long lower shadow, or a bearish Pin Bar with a long upper shadow).
- Interpretation: This is a more reliable reversal signal. The Pin Bar pattern represents a strong rejection of the price after an attempt to break through; combined with increased volume, this indicates strong reversal momentum.
- R3 (Top Momentum): In addition to R2, the trading volume reaches a "massive" level (default is more than 4 times the average volume).
- Interpretation: This is the highest level reversal signal. It usually appears at the end of a trend, representing the extreme struggle and conversion of bullish and bearish forces, and is a potential sign of a "V-shaped reversal" or a deep V-bottom/top.
- C Series - Trend Continuation/Termination Signals:
- C0 (Trend Continuation): In a clear uptrend, a bearish Pin Bar (long upper shadow) with increased volume appears during a price pullback; or in a downtrend, a bullish Pin Bar (long lower shadow) with increased volume appears during a rebound.
- Interpretation: This is a classic "buy on pullback/sell on rebound" signal. It indicates that the pullback/rebound attempt to counterattack is quickly suppressed by the strong main trend, making it an excellent entry point for adding to positions or following the trend.
- CX (Exhaustion Signal): A C-series signal that appears when the price has moved far away from the slow Vegas Channel (default more than 5 times the ATR distance).
- Interpretation: This is an advanced use of the C-series. After a trend has run for a long time, market sentiment may be overly enthusiastic. The high-volume PinBar appearing at this time, while trend-following in form, is more likely to represent the exhaustion or "final frenzy" of the trend. This is an alert that the trend may be running out of momentum, and you should consider taking profits in batches rather than adding to your position.
Signal Priority: This indicator has been internally optimized: CX/R3 > R2 > C0 > R1. Higher-level signals will override lower-level signals, ensuring you see the most important information at the moment.
Module 5: Chandelier Exit - Dynamic Risk Management
This is a dynamic stop-loss system based on ATR (Average True Range).
- How it works:
- In an uptrend, it subtracts N times the ATR from the recent high, forming a stepped upward stop-loss line.
- In a downtrend, it adds N times the ATR from the recent low, forming a stepped downward stop-loss line.
- Core advantages: It automatically adjusts the stop-loss distance based on market volatility. During periods of high market volatility, the stop-loss widens, giving you more room; during periods of market stability, the stop-loss tightens, locking in profits more quickly.
- Usage:
- As an initial stop-loss: After entering a position, the stop-loss can be set outside the Chandelier line.
- As a trailing stop: The position is held as long as the price does not fall below (uptrend) or rise above (downtrend) the Chandelier line. This is a powerful tool for "letting profits run."
- As an auxiliary trend indicator: The direction of the chandelier line (upward/downward) also provides a concise short-term trend perspective.
Module Six: Candlestick Coloring
This feature is very intuitive; it colors candlesticks based on volume:
- High Volume (Orange): Volume exceeds twice the average volume.
- Huge Volume (Red): Volume exceeds four times the average volume.
- Usage: Helps you identify key candlesticks indicating significant market events at a glance, typically the start, acceleration, reversal, or exhaustion points of a trend.
Module Seven: ICT Market Structure
This is an advanced price behavior analysis tool based on ICT (Inner Circle Trader) theory, helping you understand the market's "skeleton."
- Core Concepts:
- Swing High/Low: Local tops and bottoms in market prices.
- BOS (Break of Structure): In an uptrend, the price creates a higher high than the previous swing high; in a downtrend, it creates a lower low.
- Interpretation: BOS (Bullish Oscillator) is a confirmation signal of trend continuation. Consecutive upward BOS indicate a healthy bullish trend, and vice versa.
- MSS (Market Structure Shift, also often called CHOCH): In an uptrend, the price fails to make a new high and instead falls below the previous valid swing low.
- Interpretation: MSS is the first and most important signal of a potential trend reversal. It indicates that market forces are shifting from bullish to bearish (or vice versa).
- Period Settings (Short/Intermediate/Long Term):
- Short Term: Based on the most minute 3-bar swing points, very sensitive, suitable for short-term traders to observe subtle changes.
- Intermediate Term (Recommended): Based on higher-level swing points formed from short-term swing points, filtering out some noise, suitable for day and swing traders.
- Long Term: Based on swing points formed from intermediate-term swing points, reflecting a longer-term structure, suitable for swing and long-term traders.
- Usage: Combine market structure with your trading signals. For example, in an uptrend (price above the Vegas Channel), each upward BOS confirms the health of the trend. If a C0 pullback signal appears at this point, it would be an excellent entry point. Conversely, if an MSS appears, even with a strong buy signal, caution is advised, as the trend may be reversing.
Module Eight: Information Panel
This is your "cockpit dashboard," consolidating all key information in one place, giving you a clear overview of the current market state:
- Main Trend Direction: The final trend judgment given by multiple indicators.
- Alligator Line Pattern: Shows whether the current trend is trending or consolidating.
- OBV Status: Whether funds are flowing in or out.
- ADX Status: Whether the trend is strong or weak.
- Chandelier Stop-Loss Direction: Short-term trend direction.
Module 1: Master Switches
This is your "dashboard master control." Due to the numerous indicator functions, charts can appear cluttered. Here, you can easily turn each major function module on or off, allowing you to focus on the information you need most.
- Suggested Usage: When using it for the first time, you can start by only turning on the Vegas Channel and Core Entry Signals to familiarize yourself with the system's main trend judgment and entry logic. Then gradually turn on other modules to experience how they work together.
Module 2: Core Entry Signals (Long/Short Signals)
This is the "engine" of the entire system, responsible for generating the highest quality trend-following trading signals. The appearance of a "long" or "short" signal represents the resonance of multiple indicators, satisfying extremely stringent filtering conditions:
- 1. Vegas Channel Filtering:
- When going long, the price must be above the slow channel (576/676 EMA) and the fast channel (21/55 EMA).
- When shorting, the price must break below both the slow and fast channels.
- Interpretation: This ensures your trading direction is perfectly aligned with the medium- to long-term macro trend.
- 2. Alligator Line Confirmation:
- When going long, the price must be above the alligator lines (lips, teeth, jaws), and the alligator lines must be in a bullish alignment (opening upwards).
- When shorting, the opposite applies.
- Interpretation: This confirms that short-term momentum aligns with the long-term trend, avoiding hasty entry at the start or end of a trend.
- 3. OBV (On-Balance Volume) Filter:
- When going long, the OBV value must be above its own moving average (default 34 periods).
- When shorting, the OBV value must be below its moving average.
- Interpretation: OBV is a key indicator measuring fund inflows and outflows. This condition ensures that trading volume (funds) is supporting your trading direction.
- 4. ADX Trend Strength Filter:
- Whether going long or short, the ADX value must be greater than the set threshold (default 20).
- Interpretation: This is a crucial "insurance" layer. It helps filter out volatile market conditions with no clear direction, prone to repeated "misjudgments." We only act in markets with clear and strong trends.
Core Usage: Once a "long"/"short" signal appears, it represents a high-certainty trend-following trading opportunity. Due to the very strict nature of the signals, they appear infrequently, but each one deserves your close attention.
Module Three: Vegas Channel & Alligator Line (Trend Judgment Tool)
- Vegas Channel: Composed of two sets of EMAs.
- Slow Channel (576/676): Your "bull/bear dividing line." Above this line, only consider going long; below this line, only consider going short. It is your strategic compass.
- Fast Channel (21/55): Your "short-term momentum line." In an uptrend, price pullbacks to the vicinity of the fast channel are potential areas for adding to positions or entering.
- Alligator Line:
- Widening divergence: Indicates that a trend is underway.
- Convergence/Entanglement: Indicates the market is dormant or consolidating.
- Interpretation: Alligator lines allow you to visually see whether the market is in a "trending" or "consolidating" state. We primarily trade when the alligator lines widen.
Module Four: R/C Volume-Price Signals (Refined Entry/Warning Signals)
This is the system's "special forces," specifically designed to identify abnormal volume and price movements on key candlesticks. It is divided into the R series (Reversal) and the C series (Continuation).
- Prerequisites: All signals are based on trading volume. A signal's appearance must be accompanied by a significantly higher-than-average trading volume (increased volume). This indicates large capital participation at that price level, making the signal more reliable.
- R Series - Trend Reversal Signals (Warning/Opportunity):
- R1 (Core Reversal): In a downtrend, a sudden increase in volume on a bullish candlestick; or in an uptrend, an increase in volume on a bearish candlestick.
- Interpretation: This is the most basic reversal warning signal. It tells you that counter-trend forces are emerging, but it doesn't mean the trend will immediately reverse. Confirmation needs to be combined with other signals.
- R2 (Pattern Confirmation): In addition to R1, this candlestick must also be a well-defined Pin Bar (a bullish Pin Bar with a long lower shadow, or a bearish Pin Bar with a long upper shadow).
- Interpretation: This is a more reliable reversal signal. The Pin Bar pattern represents a strong rejection of the price after an attempt to break through; combined with increased volume, this indicates strong reversal momentum.
- R3 (Top Momentum): In addition to R2, the trading volume reaches a "massive" level (default is more than 4 times the average volume).
- Interpretation: This is the highest level reversal signal. It usually appears at the end of a trend, representing the extreme struggle and conversion of bullish and bearish forces, and is a potential sign of a "V-shaped reversal" or a deep V-bottom/top.
- C Series - Trend Continuation/Termination Signals:
- C0 (Trend Continuation): In a clear uptrend, a bearish Pin Bar (long upper shadow) with increased volume appears during a price pullback; or in a downtrend, a bullish Pin Bar (long lower shadow) with increased volume appears during a rebound.
- Interpretation: This is a classic "buy on pullback/sell on rebound" signal. It indicates that the pullback/rebound attempt to counterattack is quickly suppressed by the strong main trend, making it an excellent entry point for adding to positions or following the trend.
- CX (Exhaustion Signal): A C-series signal that appears when the price has moved far away from the slow Vegas Channel (default more than 5 times the ATR distance).
- Interpretation: This is an advanced use of the C-series. After a trend has run for a long time, market sentiment may be overly enthusiastic. The high-volume PinBar appearing at this time, while trend-following in form, is more likely to represent the exhaustion or "final frenzy" of the trend. This is an alert that the trend may be running out of momentum, and you should consider taking profits in batches rather than adding to your position.
Signal Priority: This indicator has been internally optimized: CX/R3 > R2 > C0 > R1. Higher-level signals will override lower-level signals, ensuring you see the most important information at the moment.
Module 5: Chandelier Exit - Dynamic Risk Management
This is a dynamic stop-loss system based on ATR (Average True Range).
- How it works:
- In an uptrend, it subtracts N times the ATR from the recent high, forming a stepped upward stop-loss line.
- In a downtrend, it adds N times the ATR from the recent low, forming a stepped downward stop-loss line.
- Core advantages: It automatically adjusts the stop-loss distance based on market volatility. During periods of high market volatility, the stop-loss widens, giving you more room; during periods of market stability, the stop-loss tightens, locking in profits more quickly.
- Usage:
- As an initial stop-loss: After entering a position, the stop-loss can be set outside the Chandelier line.
- As a trailing stop: The position is held as long as the price does not fall below (uptrend) or rise above (downtrend) the Chandelier line. This is a powerful tool for "letting profits run."
- As an auxiliary trend indicator: The direction of the chandelier line (upward/downward) also provides a concise short-term trend perspective.
Module Six: Candlestick Coloring
This feature is very intuitive; it colors candlesticks based on volume:
- High Volume (Orange): Volume exceeds twice the average volume.
- Huge Volume (Red): Volume exceeds four times the average volume.
- Usage: Helps you identify key candlesticks indicating significant market events at a glance, typically the start, acceleration, reversal, or exhaustion points of a trend.
Module Seven: ICT Market Structure
This is an advanced price behavior analysis tool based on ICT (Inner Circle Trader) theory, helping you understand the market's "skeleton."
- Core Concepts:
- Swing High/Low: Local tops and bottoms in market prices.
- BOS (Break of Structure): In an uptrend, the price creates a higher high than the previous swing high; in a downtrend, it creates a lower low.
- Interpretation: BOS (Bullish Oscillator) is a confirmation signal of trend continuation. Consecutive upward BOS indicate a healthy bullish trend, and vice versa.
- MSS (Market Structure Shift, also often called CHOCH): In an uptrend, the price fails to make a new high and instead falls below the previous valid swing low.
- Interpretation: MSS is the first and most important signal of a potential trend reversal. It indicates that market forces are shifting from bullish to bearish (or vice versa).
- Period Settings (Short/Intermediate/Long Term):
- Short Term: Based on the most minute 3-bar swing points, very sensitive, suitable for short-term traders to observe subtle changes.
- Intermediate Term (Recommended): Based on higher-level swing points formed from short-term swing points, filtering out some noise, suitable for day and swing traders.
- Long Term: Based on swing points formed from intermediate-term swing points, reflecting a longer-term structure, suitable for swing and long-term traders.
- Usage: Combine market structure with your trading signals. For example, in an uptrend (price above the Vegas Channel), each upward BOS confirms the health of the trend. If a C0 pullback signal appears at this point, it would be an excellent entry point. Conversely, if an MSS appears, even with a strong buy signal, caution is advised, as the trend may be reversing.
Module Eight: Information Panel
This is your "cockpit dashboard," consolidating all key information in one place, giving you a clear overview of the current market state:
- Main Trend Direction: The final trend judgment given by multiple indicators.
- Alligator Line Pattern: Shows whether the current trend is trending or consolidating.
- OBV Status: Whether funds are flowing in or out.
- ADX Status: Whether the trend is strong or weak.
- Chandelier Stop-Loss Direction: Short-term trend direction.
Script protegido
Este script se publica como código cerrado. Sin embargo, puede utilizarlo libremente y sin limitaciones: obtenga más información aquí.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script protegido
Este script se publica como código cerrado. Sin embargo, puede utilizarlo libremente y sin limitaciones: obtenga más información aquí.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.