Market Structure External/Internal with BOS/CHoCH/FTC [zazenio]You're staring at a chart trying to figure out one thing: which way is price going? You see a move up—is it a new trend or just a pullback? You spot what looks like a swing low, but is it real or will price slice right through it? And even if you get the direction right, where do you enter?
This market structure indicator can help answer these questions.
Market Structure 2.0 tracks swing points and tells you when they actually break—not when a wick pokes through, but when price closes beyond the level. That close is what matters.
CHoCH (Change of Character) – Your signal that trend direction may be flipping. If price has been making lower lows then suddenly closes above a swing high, that's a CHoCH. Doesn't guarantee reversal, but the character of the move has shifted.
BOS (Break of Structure) – Confirms trend continuation. In an uptrend, when price closes above the previous swing high, that's a BOS. Buyers are still in control.
FTC (Failure to Close) – Price wicked beyond a pivot but couldn't close there. Someone defended that level. A warning sign that the move might stall or reverse.
External vs Internal Structure
External structure is your CTF (current timeframe) trend—the main swing points that define overall direction.
Internal structure tracks price action forming within the current pivot range. It auto-resets each time external structure breaks, keeping your chart clean.
External is more important for trend direction. Internal gives you insight into what's happening between those major swings—useful for timing entries on pullbacks.
The BOS Counter
A dashboard tracking consecutive BOS counts with color-coded trend state:
Green – Trending bullish, price holding above CHoCH level
Red – Trending bearish, price holding below CHoCH level
Gray – Sideways/ranging, price has crossed back through CHoCH but no new break yet
** Gray means caution—what was trending is now in question.
Premium & Discount Zones
Zones based on the range between the most recent external swing high and low:
Premium – Top 25%, look for shorts
Discount – Bottom 25%, look for longs
50% line – Equilibrium
** Optional alerts when price enters either zone.
What Makes This Different
Most pivot indicators mark swings after a fixed bar count. This indicator only confirms a pivot when price breaks structure the other way. That swing low isn't real until price closes above the swing high. Until then, it shows faded—potential, not confirmed.
Every element is fully customizable—colors, styles, labels, positioning. Make it fit your setup.
━━━━━━━━━━━━━━━━━━━━━━
Features v2.0
Automatic swing high and swing low detection
Structure-based pivot confirmation (closes beyond level, not fixed lookback)
Customizable pivot markers (style, size, colors)
Adjustable swing width sensitivity
Dual-layer analysis (External CTF trend + Internal structure within pivot range)
BOS lines for trend continuation
CHoCH lines for potential reversals
FTC lines for failed breakouts / level rejections
Fully customizable structure lines (colors, styles, widths, labels)
Real-time BOS counter dashboard with trend state (trending vs sideways)
Premium zone (upper 25% of range)
Discount zone (lower 25% of range)
50% equilibrium line
Zone entry alerts (Premium & Discount)
Internal structure auto-resets on external breaks
Provisional structure lines (live preview before bar close)
Unconfirmed pivots displayed faded until validated
━━━━━━━━━━━━━━━━━━━━━━
Disclaimer : This script is provided for educational and informational purposes only. It is not financial advice and does not constitute a recommendation to buy or sell any financial instrument. Always do your own research and trade at your own risk.
Trend Analysis
Viper Screener🔶 Overview
The Mkt-Viper Screener is the tactical command center of the Viper Suite. It is a multi-asset Telemetry Dashboard designed to provide market-wide situational awareness in a single glance.
Instead of flipping through dozens of charts to find setups, the Viper Screener processes up to 20 assets simultaneously, running them through the core "Viper V5" calculation kernel. It instantly categorizes market conditions based on Trend, Structure, Mean Reversion, and Momentum, allowing you to identify high-probability confluences across the entire market instantly.
🔶 What makes Mkt-Viper Screener unique?
While most screeners only look at simple Moving Averages or RSI, this tool runs a Regenerative Calculation Kernel. It miniaturizes the complex math found in the Viper Pro, Edge, and Oscillator and runs lightweight versions of them on 20 different tickers in the background.
It serves as the "Nexus" of the system, synchronizing the logic of the entire suite into a unified Heads-Up Display (HUD).
Main Features
The dashboard organizes data into four critical dimensions of market analysis:
🔶 1. Trend Signal (The "Pro" Engine)
This column utilizes the Viper Trend Signal logic found in the Mkt-Viper Pro.
BUY:
The asset is in a confirmed Bullish Trend.
SELL:
The asset is in a confirmed Bearish Trend.
🔶 2. Viper Band Status
This column calculates the asset's location relative to the dynamic volatility band.
ABOVE:
Price is extended to the upside (Potential Breakout or Overextension).
BELOW:
Price is extended to the downside.
INSIDE:
Price is trading within the mean-reversion channel (Consolidation).
🔶 3. Market Structure
This analyzes the swing points (Pivots) of the asset to determine the structural bias.
BULLISH:
The asset is making Higher Highs/Lows.
BEARISH:
The asset is making Lower Highs/Lows.
🔶 4. Oscillator Momentum
This utilizes a gravity-based momentum calculation similar to the Viper Oscillator.
RISING ↗:
Velocity is expanding upward.
FALLING ↘:
Velocity is expanding downward.
🔶 Global Auto-Tuning
The screener includes the Viper Synapse Tuner. You can set the sensitivity of the Trend Engine globally.
Fast:
For scalping multiple tickers on lower timeframes.
Moderate:
The standard setting for Swing Trading.
Slow:
For filtering macro-trends across the market.
🔶 Visual Intelligence (UI)
The interface is built with a "Glassmorphism" aesthetic designed to overlay cleanly on your chart without obstructing price action.
Positioning: Fully customizable (Top/Bottom, Left/Right).
Size: Scalable text to fit 4K monitors or Laptops.
🔶 How to use: The "Royal Flush" Workflow
The Screener is designed to find Alignment in the Market.
Step 1: Configuration
Input your favorite 20 assets (Crypto, Forex Pairs, or Indices) into the settings menu. Set the "Screener Timeframe" to your higher timeframe bias (e.g., 4 Hour or Daily).
Step 2: The Scan
Watch the dashboard. You are looking for Total Confluence.
The Strategy:
Full Bullish Lock: When the Trend is BUY, Structure is BULLISH, and Momentum is RISING. This indicates a high-probability impulse move is underway.
Contrarian Scan: If Trend is BUY, but the Viper Band says "ABOVE" and Momentum is "FALLING," the asset is likely due for a pullback. This alerts you to check the chart for a short setup.
🔶 Technical Note: Data Updates & Repainting
Real-Time Recalculation:
The dashboard updates in real-time. This means the status of the Current Open Candle (e.g., the current 4-Hour bar) is fluid. If price is fluctuating around the trendline, the "TREND" cell may flip between BUY and SELL until the candle officially closes. This is normal behavior for real-time monitoring tools.
Historical Data:
This script utilizes request.security with lookahead=barmerge.lookahead_off. This ensures that historical data does not repaint. Once a candle closes and a status is locked, it will never change.
Data Loading:
When loading the screener for the first time, allow the script a moment to fetch data for all 20 tickers. If a cell shows "NaN" or blank, it typically resolves on the next tick.
---------------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, back test, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
SMC Alpha Engine [PhenLabs]📊 SMC Alpha Engine
Version: PineScript™ v6
📌 Description
The SMC Alpha Engine is a comprehensive Smart Money Concepts indicator that automates institutional trading pattern recognition. Built for traders who understand that confluence is king, this indicator stacks multiple SMC elements together and scores them in real-time, allowing you to focus exclusively on high-probability setups.
Rather than manually tracking HTF bias, market structure, liquidity levels, order blocks, and fair value gaps separately, the SMC Alpha Engine consolidates everything into a unified scoring system. When enough factors align, you get a signal. When they don’t, you wait. This systematic approach removes emotion and subjectivity from SMC trading.
The indicator is designed around one core principle: only trade when the probabilities are stacked in your favor. By requiring multiple confluence factors before generating signals, it filters out the noise and keeps you focused on setups that institutional traders actually care about.
🚀 Points of Innovation
Automated confluence scoring system that evaluates 6 distinct SMC factors in real-time
HTF-to-LTF bias alignment ensuring trades flow with institutional direction
Intelligent liquidity sweep detection using wick-ratio analysis for confirmation
ATR-based FVG quality filtering that eliminates noise and shows only significant imbalances
Anti-spam signal logic preventing overtrading during volatile market conditions
Session-aware killzone integration timing entries with institutional activity windows
🔧 Core Components
HTF Bias Engine: Analyzes higher timeframe swing structure to establish directional bias using pivot high/low comparisons
Market Structure Module: Detects BOS (Break of Structure) and CHoCH (Change of Character) with real-time confirmation
Premium/Discount Calculator: Dynamically maps price zones relative to recent swing range equilibrium
Liquidity Tracker: Monitors swing points as liquidity targets and identifies sweep events with rejection confirmation
POI Detector: Identifies valid Order Blocks with displacement requirements and Fair Value Gaps with ATR filtering
Confluence Scorer: Aggregates all factors into bull/bear scores displayed on real-time dashboard
🔥 Key Features
Multi-timeframe analysis combining HTF directional bias with LTF precision entries
Customizable confluence threshold from 1 (low filter) to 5 (sniper mode)
Three killzone sessions: London (02:00-05:00), NY AM (08:30-11:00), NY PM (13:30-16:00)
Flexible mitigation options for OBs and FVGs: Wick, Close, 50%, or None
Visual structure labeling for BOS and CHoCH events on chart
Real-time info dashboard showing all current market conditions and scores
Built-in alert conditions for BOS, liquidity sweeps, and high-confluence signals
🎨 Visualization
Premium Zone: Red-tinted box above equilibrium indicating sell-side interest areas
Discount Zone: Green-tinted box below equilibrium indicating buy-side interest areas
Equilibrium Line: Dotted gray line marking the 50% level of current range
Order Blocks: Color-coded boxes (green for bullish, red for bearish) showing institutional candles
Fair Value Gaps: Teal boxes for bullish FVGs, maroon boxes for bearish FVGs
Killzone Backgrounds: Blue (London), Orange (NY AM), Purple (NY PM) session highlighting
Info Table: Top-right dashboard displaying HTF bias, LTF trend, zone, killzone status, and scores
📖 Usage Guidelines
HTF Settings
HTF Timeframe - Default: 60 - Controls higher timeframe for directional bias
HTF Swing Length - Default: 10, Range: 3+ - Determines pivot sensitivity for HTF trend
Market Structure Settings
LTF Swing Length - Default: 3, Range: 1-10 - Controls swing detection sensitivity
Show BOS/CHoCH - Default: Off - Toggles structure labels on chart
Show Strong/Weak Points - Default: Off - Displays swing point classifications
POI Settings
Show Valid Order Blocks - Default: Off - Displays OBs that caused displacement
Show Unmitigated FVGs - Default: On - Shows active fair value gaps
Filter FVG by ATR - Default: On - Only shows FVGs larger than 0.5x ATR
OB Mitigation Type - Options: Wick, Close, None - Determines when OBs are invalidated
FVG Mitigation Type - Options: Wick, Close, 50%, None - Determines when FVGs are filled
Confluence Settings
Minimum Score for Signal - Default: 4, Range: 1-5 - Required confluence level for entries
Show Entry Signals - Default: On - Toggles LONG/SHORT labels on chart
✅ Best Use Cases
Trend continuation trades during active killzone sessions with HTF alignment
Discount zone entries on bullish HTF bias with recent liquidity sweep below
Premium zone shorts on bearish HTF bias after liquidity grab above recent highs
Reversal identification following CHoCH with POI confluence in optimal zone
Filtering existing strategy signals by requiring minimum confluence score
⚠️ Limitations
HTF bias detection requires sufficient price history for accurate pivot identification
Liquidity sweep detection depends on wick-ratio settings and may miss some events
Order blocks require displacement confirmation which may exclude some valid zones
Confluence scoring is probabilistic and does not guarantee profitable outcomes
Killzone times are based on EST/EDT and require timezone adjustment for other regions
Signal spam prevention may delay valid signals by up to 10 bars after previous signal
💡 What Makes This Unique
Unified SMC Framework: Combines all major SMC concepts into one cohesive indicator rather than requiring multiple tools
Objective Scoring System: Removes subjectivity by quantifying confluence into measurable scores
Institutional Timing Integration: Built-in killzone awareness ensures signals align with high-volume sessions
Quality Filtering: ATR-based FVG filtering and displacement-required OBs eliminate low-quality setups
Anti-Overtrading Logic: Smart signal spacing prevents emotional trading during choppy conditions
🔬 How It Works
Step 1: HTF Bias Determination
Analyzes higher timeframe pivot highs and lows
Compares consecutive pivots to identify HH/HL (bullish) or LH/LL (bearish) sequences
Establishes directional filter that all signals must respect
Step 2: LTF Structure Mapping
Detects swing points on execution timeframe
Identifies BOS when price closes beyond confirmed swing level
Recognizes CHoCH when structure break occurs against current trend
Step 3: Confluence Calculation
Awards +1 for HTF bias alignment
Awards +1 for active killzone timing
Awards +1 for optimal zone positioning (discount for longs, premium for shorts)
Awards +1 for price at unmitigated POI
Awards +1 for recent liquidity sweep in trade direction
Awards +1 for recent supportive structure break
Step 4: Signal Generation
Compares total score against user-defined minimum threshold
Requires candle confirmation (bullish close for longs, bearish close for shorts)
Applies 10-bar spacing filter to prevent signal clustering
💡 Note:
This indicator is designed for traders already familiar with Smart Money Concepts. While it automates detection and scoring, understanding why each factor matters will significantly improve your ability to filter signals and manage trades effectively. Use the minimum confluence setting to match your risk tolerance, higher values mean fewer but higher-quality signals.
HiMAC Basic v2.3.2HiMAC Basic v2.2.3 - Indicator Brief Description
Core Concept:
HiMAC (High-Probability MACD) is a multi-timeframe confluence trading indicator that identifies high-probability reversal signals using MACD histogram patterns combined with RSI and Doji filtering.
Key Features:
1. Signal Detection Logic:
- Dark MACD Bar Sequencing: Tracks consecutive expanding MACD histogram bars
- Pair Validation: Requires 2 consecutive dark bars of same color
- Immediate Stop: Stops checking after first valid signal pair (C1-C2, C2-C3, or C3-C4)
2. Smart Filtering:
- RSI Validation: Blocks overbought/oversold signals (70/30 levels)
- Doji Filtering: Excludes signals with Doji candles (body <15% of range)
- Signal Lockout: 2-bar cooldown after each signal to prevent overlap
How It Works:
Signal Conditions (BULLISH):
- Two consecutive dark green MACD bars
- Both corresponding candles are green (close ≥ open)
- Neither candle is a Doji
- RSI not ≥ 70 (not overbought)
- Signals below bar for long entries
Signal Conditions (BEARISH):
- Two consecutive dark red MACD bars
- Both corresponding candles are red (close < open)
- Neither candle is a Doji
- RSI not ≤ 30 (not oversold)
- Signals above bar for short entries
Visual Components:
- Green Triangle ▼ = Bullish signal (below bar)
- Red Triangle ▲ = Bearish signal (above bar)
- Green Line = Bullish entry price (solid)
- Red Line = Bearish entry price (dashed)
- Status Table = Real-time system status
Use Case:
Best for: Swing trading on H1-H4 timeframes with Daily trend alignment
Markets: Forex, Crypto, Indices (works best with trending instruments)
Style: Counter-trend within larger trend (pullback entries)
LANZ Origins🔷 LANZ Origins – Multi-Framework Liquidity, Structure & Risk Management Overlay
LANZ Origins is a multi-tool TradingView indicator designed to provide session context, liquidity mapping, imbalance visualization, higher-timeframe candle projection, and a fixed-SL lot size calculator.
It includes:
Risk & Lot Size Panel (up to 5 accounts):
Calculates lot size using a fixed Stop Loss in pips and a standard pip value assumption ($10 per pip per 1.0 lot). For each enabled account, it displays the estimated lots and dollar risk based on account capital and risk %. The panel is fully customizable (colors, text size, visibility).
Session Backgrounds (New York time):
Colors the chart by time blocks: Day Division, No Action Zone, Killzone, and Hold Session, helping traders visually segment the trading day.
Asian Range Liquidity Box (19:00–02:00 NY):
Draws a dynamic box tracking the session high/low, plus an optional midline (50%) with optional label. The script correctly handles sessions that cross midnight.
Imbalance Detector:
Detects and draws Fair Value Gaps (FVG), Opening Gaps (OG), and Volume Imbalances (VI) with adjustable filters (min width by points/%/ATR and extension). Optionally shows a dashboard summarizing frequency and fill rate.
ICT HTF Candles Overlay:
Projects selected higher-timeframe candles to the right of price (e.g., 30m enabled by default), with optional labels, remaining time, trace lines (O/C/H/L) and internal imbalance highlights for those HTF candle sets.
30m ZigZag projected to all timeframes:
Computes ZigZag pivots from the 30-minute timeframe and draws them on any chart timeframe, including an optional live extending leg.
LANZ Origins does not execute trades and does not generate buy/sell entries. It is a visual framework for analysis, context, and risk planning.
Trend ComboI have just combined Vwap with EMA's, along with a Parabolic Sar to help with timing potential entries and exits. Always use a stop loss.
QUANTUM VELOCITY | Institutional ScalperThe **QUANTUM VELOCITY | Institutional Scalper** is a premium, institutional-grade trading system designed specifically for the volatility of the Gold (XAUUSD) market. It combines advanced trend algorithms with "Locked" non-repainting signals to provide a reliable edge for both Scalpers and Swing Traders.
**Key Features:**
1. **🚀 Auto-Optimization Engine**: Automatically detects your timeframe (5m, 1H, Daily) and adjusts internal sensitivity, trend filters, and zone strength to match market conditions. No manual tuning required.
* *5m Scalping*: Uses EMA 21 & Strict filtering.
* *Swing*: Uses EMA 50 & Balanced settings.
2. **🔒 Zero-Repaint "Locked" Signals**: All entry signals (Triangles) and trade management lines are calculated on the *Confirmed Previous Candle*. Once a signal appears, it stays. No more "disappearing" signals.
3. **🌊 Ribbon Trend Cloud**: Replaces standard candles with a Heiken Ashi Smoothed Ribbon.
* *Green Ribbon*: Bullish Momentum.
* *Red Ribbon*: Bearish Momentum.
4. **📦 Smart Supply & Demand**: Automatically identifies and draws the most significant Supply and Demand zones ("Order Blocks") based on institutional pivot points, extended for clarity.
5. **🛡️ Risk Management System**: Built-in 2:1 Reward/Risk ratio visualizer. Shows Entry, Stop Loss, and Take Profit lines for the last 5 setups to help you review past performance instantly.
**How to Use:**
* **Scalping (M5)**: Follow the "Buy" triangles when the Ribbon is Green. Ensure price is above the 200 SMA (if enabled).
* **Swing (H1/D1)**: Use major trend changes and Supply/Demand zones for entries.
**Optimization:**
* Tuned specifically for **CAPITALCOM:GOLD** and other XAUUSD feeds.
---
Stop guessing in the Gold market. The new **Quantum Velocity** indicator brings institutional precision to your chart.
✅ **NO Repainting** (Signals Lock on Close)
✅ **Auto-Optimized** for Gold (5m/1H/Daily)
✅ **Smart Supply/Demand** Zones
✅ **Built-in Risk Management** (Entry/SL/TP)
Perfect for XAUUSD scalpers who are tired of fakeouts.
Chan Theory - Chanlun Pro | CJZT# Chan Theory - Chanlun Pro | CJZT
## Overview
This is the professional version of Chan Theory (缠论) structural analysis indicator, built with Pine Script v6. It provides comprehensive multi-level structure recognition, advanced trading signals, MACD divergence analysis, and additional professional tools including Pivot Points support/resistance levels, liquidity-weighted moving averages, and customizable alert systems.
**Why This Indicator?**
Real market movements rarely follow textbook patterns. This indicator addresses this reality with:
- **Single Pen to Segment**: When a powerful pen breaks the previous level's extreme or meets K-line count requirements (configurable 5-30 K-lines), it can directly become a segment
- **9-Pen Segment to Trend**: A segment containing 9+ pens can upgrade to trend line level
- **Flexible Level Upgrade**: Multiple conditions (extremum breakthrough, count requirements, or either) allow the structure to adapt to actual market behavior
- **4K/5K Pen Types**: Designed to better fit sub-cycle movements with shorter K-line requirements
- **Top/Bottom to Pen**: When top/bottom fractal strength is significant, allows pen formation based on amplitude ratio
- **Professional Tools**: Includes Pivot Points, liquidity-weighted MAs, and advanced filtering systems
**Key Features:**
- 5 pen types: Classic, Optimized, 4K, 5K, Strict
- 3 segment modes: Dynamic Correction, Strict, Extension
- 3-level structure: Pens → Segments → Trend Lines
- Complete Type I/II/III trading signals
- MACD divergence analysis
- Pivot Points support/resistance (Traditional, Fibonacci, Camarilla)
- Liquidity-weighted moving averages
- Advanced signal filtering system
- Custom alert configurations
## What Makes This Indicator Original
This indicator is an original implementation of Chan Theory with several unique innovations:
**1. Flexible Level Upgrade System**
Unlike traditional Chan Theory indicators that strictly require 3 pens to form a segment, this indicator introduces practical upgrade conditions. A powerful pen can directly become a segment when it breaks the previous level's extreme OR meets K-line count requirements (configurable 5-30 K-lines).
**2. Five Distinct Pen Construction Types**
Provides multiple pen detection methods (Classic/Optimized/4K/5K/Strict) to fit different market conditions and timeframes, allowing traders to choose the most appropriate method for their trading style.
**3. Integrated Professional Tools**
Combines Chan Theory analysis with professional trading tools:
- **Pivot Points**: Classic support/resistance levels using public domain algorithms (Traditional, Fibonacci, Camarilla)
- **Liquidity-Weighted MAs**: Advanced moving averages based on volume and price movement
- **Custom Alert System**: Configure specific combinations of buy/sell signals for personalized alerts
**4. Three-Level Hierarchical Structure**
Complete implementation of Pens → Segments → Trend Lines with independent controls for each level, including separate extension modes and signal generation.
**5. Comprehensive Signal Filtering**
Multiple filter options including fractal validation, MACD divergence, zero-axis filters, and liquidity confirmation to improve signal quality.
## Core Functions
### 1. Candlestick Containment Processing
Advanced containment processing with configurable options:
- **Left Containment**: Standard processing
- **Right Containment Check**: Optional additional validation
- Recursive processing ensures complete elimination
### 2. Pen Construction (5 Types)
| Type | Description |
|------|-------------|
| **Classic (老笔)** | 5+ processed K-lines per pen |
| **Optimized (新笔)** | 4+ processed + 5+ raw K-lines |
| **4K** | 4 raw K-lines with extremum validation |
| **5K** | 5 raw K-lines standard |
| **Strict (严笔)** | 5+ K-lines with directional validation |
### 3. Single Pen to Segment
Advanced level upgrade conditions:
- **Extremum Breakthrough**: Based on breaking previous level extremes
- **K-line Count**: Based on K-line count (5-30 configurable)
- **Either Satisfied**: Either condition can trigger upgrade
### 4. Segment Modes
| Mode | Description |
|------|-------------|
| **Strict Mode** | No extension, segments only form when fully confirmed |
| **Extension Mode** | Allows segment extension for current market tracking |
| **Dynamic Correction** | Extends first, then corrects based on new information |
### 5. Trading Signals
Complete Type I/II/III signal system:
- **Type I (1buy/1sell)**: Trend reversal based on divergence
- **Type II (2buy/2sell)**: Pullback entries at pivot zones
- **Type III (3buy/3sell)**: Breakout confirmations
### 6. Pivot Points Support/Resistance
Classic pivot point calculations for identifying key price levels:
- **Traditional**: Standard pivot point formula
- **Fibonacci**: Fibonacci-based levels (38.2%, 61.8%)
- **Camarilla**: Intraday support/resistance levels
- Configurable timeframes (Daily, Weekly, Monthly, etc.)
### 7. Liquidity-Weighted Moving Averages
Advanced moving averages that consider volume and price movement:
- Fast and slow MA with customizable periods
- Outlier detection for identifying unusual liquidity events
- Visual fill between MAs for trend identification
### 8. Signal Filtering
Multiple filter options to improve signal quality:
- Fractal validation filter
- MACD divergence filter for Type I signals
- MACD zero-axis filter for Type II signals
- Liquidity confirmation filter
- Expected signal system (early warning)
## How to Use
### Initial Setup
1. Add indicator to chart
2. Select pen type based on your timeframe:
- Intraday (1m-15m): Use 4K or 5K for faster response
- Swing (1H-4H): Use Classic or Optimized
- Position (Daily+): Use Strict for reliability
3. Configure level upgrade:
- Conservative: "Extremum Breakthrough" only
- Balanced: "Either Satisfied" (recommended)
- Aggressive: "K-line Count" only
### Professional Tools Setup
**Pivot Points:**
- Enable "显示 支撑阻力" to show pivot levels
- Choose pivot type (Traditional recommended for beginners)
- Select timeframe (Auto adapts to chart timeframe)
**Liquidity MAs:**
- Enable "显示流动性加权均线"
- Adjust fast/slow periods based on trading style
- Use for trend confirmation and liquidity analysis
### Trading with Signals
1. **Type I Signals**: Enter on trend reversal after divergence confirmation
2. **Type II Signals**: Enter on pullbacks within established trends
3. **Type III Signals**: Enter on breakouts from pivot zones
4. **Pivot Levels**: Use as additional confirmation for entries/exits
### Best Practices
- Use higher timeframe structure for trend direction
- Enter on lower timeframe signals aligned with higher timeframe trend
- Combine pivot levels with Chan Theory signals for confluence
- Set custom alerts for your preferred signal combinations
## Settings Reference
### Display Settings
| Setting | Description |
|---------|-------------|
| Show All Fractals | Display all top/bottom patterns |
| Running Pen | Show forming (unconfirmed) pen |
| K-line Merge | Visualize containment processing |
| Fast Pen Mode | Allow pens without complete fractals |
### Pen Settings
| Setting | Description |
|---------|-------------|
| Pen Type | Choose from 5 construction methods |
| Endpoint Mode | Strict vs flexible secondary extremes |
| Fractal Overlap | Allow overlapping fractals |
| Single Pen to Segment | Enable level upgrade features |
| Upgrade Condition | Extremum/Count/Either |
| K-line Count | 5-30 (for count condition) |
### Segment Settings
| Setting | Description |
|---------|-------------|
| Segment Mode | Dynamic Correction/Strict/Extension |
| Segment to Trend | Enable 9-pen segment to trend upgrade |
| Correction Ratio | 38.2%/50%/61.8%/78.6% Fibonacci ratios |
### Pivot Points Settings
| Setting | Description |
|---------|-------------|
| Pivot Type | Traditional/Fibonacci/Camarilla |
| Timeframe | Auto/Daily/Weekly/Monthly |
| Show Labels | Display level labels |
| Show Prices | Display price values |
### Liquidity MA Settings
| Setting | Description |
|---------|-------------|
| Fast MA Length | Default 50 periods |
| Slow MA Length | Default 100 periods |
| Outlier Threshold | Sensitivity for unusual liquidity |
### Signal Filtering
| Setting | Description |
|---------|-------------|
| Fractal Filter | Require post-fractal price confirmation |
| MACD Divergence Filter | Type I signals must show divergence |
| Zero-Axis Filter | Type II signals must align with MACD |
| Liquidity Filter | Signals must confirm with liquidity MAs |
| Show Expected Signals | Display anticipated signals |
## Disclaimer
- This script is for technical analysis reference only
- Does not constitute investment advice or trading recommendations
- Past performance does not guarantee future results
- Users should make independent trading decisions and manage their own risk
- Recommended for educational purposes and as a supplementary analysis tool
## Code Attribution
This indicator uses TradingView's built-in functions and public domain algorithms:
- **Moving Averages (MA/EMA)**: Uses TradingView's built-in `ta.sma()` and `ta.ema()` functions for the customizable moving average system
- **MACD**: Standard MACD calculation using TradingView's built-in `ta.macd()` function
- **Pivot Points**: Traditional, Fibonacci, and Camarilla pivot point calculations are classic technical analysis methods widely available across all trading platforms
All Chan Theory structural analysis logic (pen construction, segment formation, pivot zone detection, and trading signal generation) is original implementation.
---
# 概述(中文)
本指标是缠论(Chan Theory)结构分析的专业版本,提供完整的多级别结构识别、高级交易信号、MACD背驰分析,以及专业工具包括支撑阻力位、流动性加权均线和自定义警报系统。
## 核心创新
**1. 灵活的级别升级系统**
单笔成段:笔可直接升级为线段(可配置5-30根K线)
**2. 五种笔类型**
适应不同市场环境:老笔、新笔、4K、5K、严笔
**3. 专业工具集成**
- 支撑阻力位(Pivot Points)
- 流动性加权均线
- 自定义警报系统
**4. 三级结构系统**
完整的层级分析:笔 → 线段 → 趋势线
**5. 完整的买卖点系统**
一二三类买卖点,支持预期信号和确认信号
## 使用方法
1. 根据周期选择笔类型
2. 配置级别升级条件
3. 启用专业工具(支撑阻力、流动性均线)
4. 观察结构形成和买卖点信号
5. 结合支撑阻力位确认入场
## 代码归属说明
本指标使用了公共领域算法:
- **支撑阻力位**:Traditional、Fibonacci、Camarilla 枢轴点计算是经典技术分析方法
- **MACD**:使用 TradingView 内置 `ta.macd()` 函数
所有缠论结构分析逻辑均为原创实现。
## 免责声明
本指标仅供技术分析参考,不构成投资建议。用户应自行做出交易决策并管理风险。
Dealing Range [TradeWithRon]Automatic Dealing Range is a precise single-timeframe dealing range & Fibonacci analysis tool built to objectively define Premium, Discount, EQ (50%), and high-probability retracement zones — without manual drawing.
Designed for ICT, Smart Money, and price-action traders, this indicator automatically tracks the previous period High, Low, and EQ, plots customizable Fibonacci presets (including OTE), highlights fill zones, and provides real-time premium/discount context through a dynamic data table.
Why Use This Indicator?
Automatically defines clean dealing ranges
Removes subjective Fibonacci placement
Clearly shows where price is trading in the range
Helps enforce patience & discipline
Keeps charts structured and lightweight
Core Features
Single timeframe dealing range
Manual timeframe control (Weekly, Daily, etc.)
Previous High / Low / EQ (50%)
Multiple Fibonacci presets:
-OTE
-ICT
-RON
-RANGE
-Custom
Custom fill zones between any two fib levels
Optional OTE-style retracement zones
Optional right-side closing time box
Dynamic line extension options
Stop lines when High or Low is crossed
Optional mitigated line-style change
Fully customizable styling & visibility
Premium / Discount data table
How I Trade This:
Define the Dealing Range
Select a higher timeframe (ex: Daily or Weekly)
Let the indicator plot:
Previous High
Previous Low
EQ (50%)
This becomes your active dealing range.
Respect Premium & Discount
Below 50% (EQ) → Discount → Long-side interest
Above 50% (EQ) → Premium → Short-side interest
I avoid taking trades against the range framework.
Refine with Fibonacci Presets:
Use:
OTE preset for 62–79% retracements
ICT or RON presets for expansion targets
Highlight custom fill zones where reactions are expected
The indicator defines the area — not the entry.
Execute on Lower Timeframe:
I only enter trades when price reacts in my zone with:
Market Structure Shift (MSS)
Displacement
Fair Value Gap (FVG)
Liquidity sweep into the range
Targets & Risk Management:
Partial profits near EQ (50%)
Final targets:
Previous High / Low
External liquidity
Stops beyond:
Structure invalidation
Dealing range High or Low
Best Confluences
Market Structure (BOS / MSS)
Fair Value Gaps
Liquidity Sweeps
Session Highs & Lows
Killzones (London / New York)
Markets & Timeframes
✔ Forex
✔ Indices
✔ Crypto
✔ Futures
✔ Stocks
Works on any chart, optimized for HTF → LTF execution models.
Premium / Discount Data Table
The built-in table shows:
Previous High
Previous Low
Current price position (% of range)
Live Discount / Premium classification
This keeps you aligned with HTF context at all times
QC Directional Entropy Analyzer QC Directional Entropy Analyzer
A multi-confirmation trend and momentum framework combining adaptive volatility bands, machine-learning classification, kernel regression, and advanced divergence analysis.
📋 DESCRIPTION
The Directional Entropy Analyzer (DEA) is a comprehensive trend-following indicator designed to identify high-probability trade opportunities by requiring alignment across multiple independent analytical engines.
Instead of relying on a single signal source, DEA cross-validates:
Adaptive trend structure
Machine-learning-based momentum classification
Kernel regression smoothing
Multi-indicator divergence detection
This layered approach helps reduce noise, filter low-quality setups, and keep traders aligned with dominant market conditions.
🎯 KEY FEATURES
1. Dual-Band Trend System
• Main Trend Band : Defines the primary market direction using adaptive ATR-based calculations
• Short-Term Band : Captures faster momentum shifts for precise timing
• Dynamic transparency reflects trend strength (stronger trends = higher visibility)
• Optional hiding of the short-term band when it conflicts with the main trend
2. Machine Learning Classification Engine (LC)
• Uses Lorentzian distance calculations to classify market behavior
• Simultaneously analyzes multiple features (RSI, WaveTrend, CCI, ADX)
• Adapts to changing market regimes with built-in volatility, regime, and ADX filters
• Kernel regression adds smoothing and directional confirmation
3. Smart Multi-Indicator Divergence Detection
• Scans 10 separate indicators for divergence patterns
• Context-aware labeling system:
– REVERSAL : Regular divergence against the current trend (possible trend change)
– CONTINUATION : Hidden divergence aligned with the trend (trend strength)
– BULLISH / BEARISH : Standard divergence classification
• Displays divergence type (REG/HID) and indicator count
• Minimum threshold filter reduces weak or isolated signals
4. Signal Generation Logic
• Buy Signals :
– ML bullish classification
– Bullish main trend
– Kernel regression confirmation
• Sell Signals :
– ML bearish classification
– Bearish main trend
– Kernel regression confirmation
• Optional divergence filter for extra confirmation
• Visual signal intensity reflects ML confidence level
📊 HOW TO USE
Reading the Bands
• Green band below price → Bullish trend (focus on longs)
• Red band above price → Bearish trend (focus on shorts)
• Band position and color flip when trend direction changes
• Background highlights major trend shifts
Reading Signals
• Green label below bar → Buy signal
• Red label above bar → Sell signal
• Stronger color = higher ML confidence
• Signals only print when multiple conditions align
Reading Divergences
• Labels appear only when the minimum divergence threshold is met (default: 5 indicators)
• REVERSAL → Possible trend exhaustion (use caution)
• CONTINUATION → Trend likely to persist (potential add-on entries)
• Number in parentheses shows how many indicators detected divergence
Info Panel Overview
The real-time panel displays:
• Trend : Main trend direction
• Short : Short-term trend and alignment (✓ / ✗)
• LC : Machine learning signal direction
• Kernel : Kernel regression direction
• Div : Divergence status
• Count : Number of diverging indicators
Recommended Workflow
Identify the main trend using the bands
Wait for an LC signal in the trend direction
Check divergence status for confirmation or warning
Enter on signal and use the band as a trailing reference
⚙️ SETTINGS GUIDE
Divergence Settings
• Minimum Number of Divergences : Higher = fewer, stronger signals (default: 5)
• Divergence Type : Regular, Hidden, or Both
• Pivot Period : Lookback window for pivot detection
• Individual Indicators : Enable or disable specific oscillators
LC (Machine Learning) Settings
• Neighbors Count : Lower = faster response, higher = smoother
• Feature Count : Number of technical features analyzed
• Filters : Volatility, regime, and ADX filters to improve signal quality
Kernel Settings
• Trade with Kernel : Require kernel confirmation
• Lookback Window : Kernel regression smoothing period
Display Settings
• Hide short-term band when opposite the main trend
• Optional ML-based bar coloring
• Optional trade statistics panel
⚠️ IMPORTANT NOTES
• No repainting : Signals are confirmed on bar close
• Not financial advice : This is a technical analysis tool
• Backtest thoroughly before live use
• Always apply proper risk management
• Performs best in trending markets; ranging markets may increase false signals
🙏 CREDITS & ACKNOWLEDGMENTS
This script builds upon concepts shared within the Pine Script community:
• Lorentzian Classification concepts inspired by jdehorty
• Multi-indicator divergence detection based on LonesomeTheBlue’s work
• Adaptive band structure and system integration are original implementations
Respect and thanks to the authors for contributing their knowledge.
📝 CHANGELOG
v1.0 — Initial Release
• Dual adaptive trend bands with dynamic transparency
• Lorentzian Classification ML engine with configurable features
• Kernel regression confirmation system
• 10-indicator divergence detection with contextual labeling
• Comprehensive filtering (volatility, regime, ADX)
• Real-time info panel and trade statistics
💬 FEEDBACK
If you find this indicator useful, feedback and suggestions are always welcome.
Trade safely and manage your risk.
TrendlinesTrendline S&R
This indicator is an automated technical analysis tool designed to identify the most relevant Support and Resistance (S&R) zones based on market pivots. Unlike standard pivot indicators that clutter the chart with historic lines, this script uses a "Closest-to-Price" algorithm to display only the single most relevant Support (Green) and Resistance (Red) zone currently interacting with price action.
It solves common frustrations with automated trendlines—specifically the issue of lines disappearing immediately upon a breakout—by introducing a Stability Buffer.
Key Features & Importance
The script scans hundreds of potential trendlines but only draws the one geographically closest to the current price.
Importance: This ensures you are looking at the zone that matters right now. It filters out distant or irrelevant historic lines, keeping your chart clean and focused on immediate price action.
🛡️ 5-Bar Stability Buffer (Anti-Flicker)
Feature: A hardcoded 5-bar "memory" prevents the zone from disappearing the moment price touches or breaks it.
Importance: This is critical for trading breakouts. It allows you to see the zone persist while price breaches it, helping you distinguish between a true breakout, a fakeout, or a retest, without the reference level vanishing from your screen.
🔍 Dynamic Pivot Filtering
Feature: Uses a restricted Pivot Strength (5-15) and Minimum Confirmation (2-8 touches).
Importance: By enforcing these limits, the indicator ignores insignificant market noise and micro-swings, ensuring that drawn zones represent structural market levels with genuine liquidity.
🔔 Integrated Alert System
Feature: Built-in alerts for "Zone Breakout" (candle close crossing the zone) and "Zone Touch" (wick entering the zone).
Importance: Allows you to set the indicator and walk away. You will be notified instantly when price interacts with these key levels, removing the need to stare at the chart.
📉 Adaptive Tolerance (Fixed ATR)
Feature: Uses a fixed ATR multiplier internally to determine the width of the zone.
Importance: This automatically adjusts the thickness of the support/resistance zone based on the asset's volatility.
Settings Guide
Bars to Apply: How far back in history the script looks for pivots (Default: 300).
Pivot Source: Choose between calculating from "High/Low" (wicks) or "Close" (bodies).
Pivot Strength: The number of bars required on each side to define a swing point (Range: 5–15).
Min Pivot Confirmation: The minimum number of touches required to validate a trendline (Range: 2–8).
How to Use
Add the indicator to your chart.
Adjust Pivot Strength if you want to catch smaller swings (lower number) or major structures (higher number).
Set an alert in TradingView by clicking the "Clock" icon, selecting this indicator, and choosing "Zone Breakout" or "Zone Touch".
RVOL WatchlistRVOL Watchlist — Intraday Relative Volume & VAH Context Scanner
Use this along with "RVOL Intraday Truth" indicator by Preps_Ver for better results on trade execution.
Overview:
RVOL Watchlist is an intraday watchlist-style monitoring tool that tracks Relative Volume (RVOL) across multiple symbols and enriches it with session Value Area context.
The script is designed to help traders quickly identify symbols showing abnormal participation near value, without generating trade signals or execution logic.
What Problem This Solves (Originality & Usefulness):
Scanning Relative Volume one symbol at a time is inefficient during fast intraday conditions.
This script solves that by:
Aggregating RVOL into a single on-chart table
Adding session Value Area High (VAH) context
Highlighting symbols where volume expansion aligns with acceptance above value
The script is intentionally non-opinionated and non-executable — it highlights where to look, not what to trade.
How It Works (Conceptual Explanation):
Relative Volume (RVOL):
RVOL compares the current session’s cumulative volume
Against the average cumulative volume of the last N trading days
Volume automatically resets at the start of each session
Calculations are replay-safe and session-aware
This ensures RVOL reflects true intraday participation, not raw volume spikes.
Session Value Area (VAH):
For each symbol, the script computes an intraday session Volume Profile:
Volume is binned by price using a configurable bin size
A Point of Control (POC) is identified as the highest-volume price level
The Value Area is built by expanding outward from the POC
Expansion continues until the configured Value Area % (default 70%) is reached
The upper boundary of this range is marked as VAH
This provides a contextual reference, showing whether price is trading above, inside, or below session value.
SS: Strong Start: RVOL + VAH Context
Symbols are visually highlighted when:
RVOL exceeds a user-defined threshold, and
Price shows acceptance relative to session VAH
This combination helps distinguish meaningful participation from random volume bursts.
Watchlist Table Behavior:
The table updates dynamically during the session
Each row represents a tracked symbol
Columns focus on RVOL and value context only
Color highlighting draws attention to abnormal participation
The table is meant for fast visual scanning, not signal generation.
Timeframe Behavior:
Intraday Charts:
Full RVOL and session VAH logic is active
Calculations reset on each new trading day
Daily / Higher Timeframes:
RVOL is derived from daily average volume
Session-specific VAH logic is inactive
How to Use:
Apply on intraday charts (1–15 min recommended)
Monitor the table for RVOL expansion near or above value
Use highlighted symbols as candidates for deeper analysis
Best suited for liquid stocks
Limitations:
Volume profile is bar-based, not tick-based
VAH accuracy depends on bar resolution
Illiquid symbols may show distorted volume distribution
Current session values evolve until market close
Volume Channel Flow [ChartPrime]⯁ OVERVIEW — Volume Channel Flow
The Volume Channel Flow indicator dynamically tracks evolving trend channels while simultaneously analyzing volume distribution within each channel segment.
By combining adaptive volatility-based channel boundaries with real-time volume profiling, the tool highlights directional bias, structural breakouts, and zones where buy/sell pressure is concentrated.
This makes it a powerful hybrid of a trend-tracking system and a miniature volume-profile engine that updates live as the market moves.
⯁ CONCEPTS
Dynamic Volatility Channel:
Upper and lower channel levels are continuously recalculated using ATR. These levels shift only when price breaks outside the previous channel, signaling a trend transition.
Channel Segmentation:
When a channel shift occurs, the previous segment is closed and visually plotted as its own range — allowing traders to inspect each discrete “flow phase” of the market.
Embedded Volume Profile:
Inside each channel segment, the indicator builds a mini volume histogram using user-defined binning. This creates a quick visual read of how volume was distributed within that price range.
Point of Control (PoC):
The price level with the highest traded volume inside each completed segment is detected and plotted as a dashed horizontal PoC line.
Flow Bias (Bullish/Bearish):
The volume profile color adapts depending on whether cumulative delta volume (buy minus sell pressure) is positive or negative for the segment.
Breakout Labels:
When a new channel is formed, arrows mark whether the breakout occurred upward or downward.
⯁ FEATURES
Adaptive Trend Channel Construction
Channels update only when price closes beyond upper or lower volatility thresholds. This isolates trend shifts with minimal noise.
Channel Visualization Options
Choose to display full channel boxes or only trend lines using customizable styling.
Real-Time Volume Profiling
As long as the channel remains active, volume distribution is recalculated live on every bar.
PoC Projection
The PoC is drawn across the channel range, marking the highest-volume price level for each segment.
Directional Delta Coloring
Volume profiles automatically shift to bullish or bearish colors based on cumulative delta inside the channel.
Breakout Detection
Arrows highlight each transition into a new channel regime.
⯁ HOW TO USE
Spot trend changes using breakout arrows and the creation of new trend channels.
Gauge strength of a channel by examining the density and shape of the internal volume profile.
Use PoC levels as potential support/resistance interaction zones.
Validate momentum by checking whether volume delta shows bullish or bearish dominance.
Monitor channel edges to anticipate continuation or reversal setups.
⯁ CONCLUSION
The Volume Channel Flow indicator merges trend structure with volume analytics, providing a continuously adaptive picture of market flow.
It not only detects where trend phases begin and end, but also reveals what type of volume behavior shaped each segment, offering a deeper understanding of trend strength and directional pressure.
RVOL Intraday TruthRVOL Intraday Truth — Context-Aware Relative Volume for Intraday/Swing Trading
Overview:
RVOL Intraday Truth is an intraday decision-support indicator that identifies stocks showing abnormal participation early in the session, while filtering out late or noisy volume spikes.
It combines time-normalized Relative Volume (RVOL) with directional and structural context and presents all key metrics in a compact on-chart table.
The goal is not to generate frequent signals, but to highlight quality intraday momentum candidates with confirmation.
Core Concept (Originality & Usefulness):
Relative Volume alone often produces false positives when used without context.
This script integrates RVOL with time, trend, and structure filters so that volume expansion is evaluated only when it matters most intraday.
Below components are designed to work together:
RVOL measures participation, EMA distance and PDH provide directional bias, Strong Start logic enforces early-session validity, Alerts and BUY line trigger only when confluence exists
This makes the script more actionable than running multiple indicators separately.
How It Works (Conceptual Explanation):
Relative Volume (RVOL):
RVOL compares the current session’s cumulative volume at the same time-of-day
Against the average cumulative volume of the last N trading days
Volume resets automatically on each new session
Calculation is replay-safe.
Strong Start (SS):
A stock is marked as Strong Start (SS) if:
At the configured start time (default 09:18 IST),
Price is above the prior day’s VAH, and
After that point, price never dips back below VAH
This ensures that RVOL expansion occurs with acceptance above prior value, not rejection.
Structural & Trend Context:
PDH (Previous Day High): confirms continuation above prior resistance
Daily EMA10 / EMA20 distance: shows whether volume expansion aligns with short-term trend
These filters help distinguish momentum participation from random volume spikes
BUY Line Logic (Intraday Only):
Can trigger only within the first N minutes from market open (09:15 IST)
One BUY signal per day
BUY level is set at the trigger bar’s high
If SS is enabled, BUY requires price to remain above prior VAH
This enforces disciplined early-session breakouts only.
Table Output:
The on-chart table provides a quick decision snapshot, including:
RVOL %
% Change Day / % Change Open
Turnover (₹ Cr)
Distance from Daily EMA10 / EMA20
Strong Start (SS) and PDH flags
The table is dynamic and adapts to user-selected columns.
Alerts (Intraday Only):
Alerts operate only on intraday charts
Start-time alert triggers once when RVOL meets R1%
In-window alerts can fire between Start and End when RVOL meets R2%
If SS is enabled, alerts require SS to be true
Higher Timeframe Behavior (Daily / HTF) :
On Daily and higher timeframes:
RVOL% is computed using daily average volume
% Change, EMA distances, and Turnover remain valid
SS, BUY, and alerts are automatically disabled
This prevents misuse outside the intended intraday context.
How to Use:
Designed for intraday charts
Best suited for liquid stocks
Focus on symbols showing high RVOL + SS + PDH alignment
Intended as a decision-support tool, not a standalone trading system
Limitations:
Volume distribution is bar-based, not tick-based
Illiquid stocks may show distorted VAH readings
BB Scoreboard MTF1. The Concept: Harmony Across TimeframesThe Musical Score Visual: This indicator transforms absolute price into a relative "score" based on standard deviations ($\sigma$). It displays the positions of Short-Term (15m), Mid-Term (1H), and Long-Term (4H) prices on a single grid, similar to a musical staff.Syncing the "Breath" of the Market: By aligning three different timeframes, you can instantly see if the entire market is "breathing" in the same direction.
2. Trading Logic: The Power of ConvergencePerfect Order (Bullish): When the Short, Mid, and Long-term lines are all above the Middle (0) line, it indicates a strong, synchronized uptrend. This is the highest probability zone for "Buy on Dip" strategies.Perfect Order (Bearish): Conversely, when all lines are below the Middle line, the market is in a synchronized downtrend, making "Sell on Rally" the dominant strategy.Overextension (The Limits): When all three lines hit the $+3\sigma$ or $-3\sigma$ levels simultaneously, the market is extremely overextended, signaling an imminent correction or exhaustion.
3. Synergizing with "Volume-Wall" (FVG)To achieve the Ultimate Scalping Setup:Alignment: Wait for all three lines on the "Scoreboard" to point in the same direction (e.g., all above 0).The Anchor: Price returns to a Strong FVG (Volume-Wall).The Trigger: Enter the trade when the Short-term line bounces off a lower $\sigma$ level and heads back toward the $+1\sigma$ or $+2\sigma$ area.
Chan Theory MACD Divergence | CJZT# Chan Theory MACD Divergence | CJZT
## Overview
This is the companion MACD subplot indicator for Chan Theory structural analysis. It visualizes MACD divergence directly on the histogram, making it easier to identify Type I buy/sell signals (divergence-based trend reversals). This indicator works in perfect sync with the main Chan Theory indicator to provide visual confirmation of divergence patterns.
**Why This Indicator?**
- **Visual Divergence Confirmation**: Displays divergence lines and labels directly on MACD histogram, eliminating guesswork
- **Multi-Level Divergence Detection**: Tracks divergence across pen-level, segment-level, and trend-level structures
- **Four Divergence Methods**: Amplitude, MACD Area, MACD Histogram, or combined - choose what works best for your strategy
- **Real-Time Alerts**: Get notified instantly when divergence patterns form across different structural levels
- **Perfect Sync**: Automatically synchronizes with the main indicator's structural analysis
**Key Features:**
- MACD histogram with divergence visualization
- Pen/Segment/Trend level divergence tracking
- Type I signal divergence confirmation
- Customizable divergence detection methods
- Multi-timeframe divergence alerts
- Clean, distraction-free subplot design
## What Makes This Indicator Original
This indicator is an original implementation designed specifically for Chan Theory divergence analysis with unique features not found in standard MACD indicators:
**1. Synchronized Structural Analysis**
Automatically synchronizes with the main Chan Theory indicator's pen/segment/trend structure using identical K-line containment processing and fractal detection, ensuring perfect alignment between main chart and MACD analysis.
**2. Multi-Level Divergence Visualization**
Unlike standard MACD indicators that only show the histogram, this indicator draws divergence lines connecting MACD peaks/troughs, labels divergence types (pen/segment/trend level), and tracks divergence across three structural levels.
**3. Four Distinct Divergence Detection Methods**
Provides flexibility with Amplitude, MACD Area, MACD Histogram (most visual), or Either Method - allowing traders to choose the most appropriate method for their strategy.
**4. Integrated Expected Signal System**
Shows anticipated divergence patterns before full confirmation, allowing traders to prepare for high-probability setups while awaiting formal confirmation.
**5. Companion Indicator Design**
Specifically designed to work seamlessly with "Chan Theory - Chanlun MAX | CJZT" main indicator, providing complete Chan Theory analysis when used together.
## Disclaimer
- This script is for technical analysis reference only
- Does not constitute investment advice or trading recommendations
- Divergence signals should be confirmed with price action
- Users should make independent trading decisions and manage their own risk
- Recommended for educational purposes and as a supplementary analysis tool
## Core Functions
### 1. MACD Divergence Visualization
Displays divergence relationships directly on the MACD histogram:
- **Pen Divergence**: Compare MACD between consecutive pens
- **Segment Divergence**: Identify divergence at segment completion
- **Trend Divergence**: Detect major trend exhaustion signals
### 2. Four Divergence Detection Methods
| Method | Description |
|--------|-------------|
| **Amplitude Divergence** | Compare price swing amplitude |
| **MACD Area Divergence** | Compare MACD histogram area sum |
| **MACD Histogram** | Compare peak histogram values (recommended) |
| **Either Method** | Trigger when any method shows divergence |
> **Pro Tip**: The MACD Histogram method is most intuitive when used with this subplot indicator, as you can visually see the histogram peak comparison.
### 3. Type I Signal Requirements
Configure when Type I signals can form:
- **Must Have Pivot**: Segment must contain at least one pivot zone
- **Pivot or 3+ Pens**: Segment has pivot OR contains 3+ pens
- **Pivot or 5+ Pens**: Segment has pivot OR contains 5+ pens
### 4. Alert System
Comprehensive divergence alerts:
- **Sub-level Divergence**: Pen-level divergence alerts
- **Main-level Divergence**: Segment-level divergence alerts
- **Big-level Divergence**: Trend-level divergence alerts
- **Multi-level Resonance**: Alerts when divergence aligns across levels
## Settings Reference
### Display Settings
| Setting | Description |
|---------|-------------|
| Fast Pen Mode | Allow pens without complete fractals |
| Pen Type | Classic/Optimized/4K/5K/Strict |
| Single Pen to Segment | Enable level upgrade features |
### Divergence Settings
| Setting | Description |
|---------|-------------|
| Divergence Method | Amplitude/MACD Area/Histogram/Either |
| Type I Pivot Requirement | Pivot or pen count requirements |
| Enable Divergence Check | Force divergence validation for Type I |
### Alert Settings
| Setting | Description |
|---------|-------------|
| Expected vs Confirmed | Alert on expected/confirmed/both signals |
| Show Expected Signals | Display anticipated divergence patterns |
## How to Use
### Setup
1. Add "Chan Theory - Chanlun MAX | CJZT" to your main chart
2. Add this "Chan Theory MACD Divergence | CJZT" indicator to a subplot
3. Both indicators will automatically synchronize their structural analysis
> **Important**: Both indicators have identical default settings. If you need to modify any configuration (such as pen type, single pen to segment conditions, etc.), make sure to apply the same changes to both the main chart and subplot indicators to maintain synchronized structural analysis.
### Reading Divergence
- **Divergence Lines**: Connect MACD peaks/troughs showing divergence
- **Divergence Labels**: Display divergence type and strength
- **Color Coding**: Visual distinction between bullish/bearish divergence
### Best Practices
- Use MACD Histogram method for clearest visual confirmation
- Watch for multi-level divergence resonance for strongest signals
- Combine with main indicator's Type I signals for entry confirmation
- Set alerts for your preferred divergence detection method
## Notes
- This script is designed to work with Chan Theory - Chanlun MAX | CJZT
- For technical analysis reference only
- Does not constitute investment advice
- Users should make independent trading decisions
---
# 概述
本指标是缠论结构分析的配套MACD副图指标。它直接在MACD柱状图上可视化背驰关系,使识别一类买卖点(基于背驰的趋势反转)变得更加容易。本指标与主图缠论指标完美同步,提供背驰形态的视觉确认。
**为什么选择本指标?**
- **可视化背驰确认**:直接在MACD柱状图上显示背驰线和标签,消除猜测
- **多级别背驰检测**:跟踪笔级别、线段级别和趋势级别的背驰
- **四种背驰方法**:振幅、MACD面积、MACD柱体或组合 - 选择最适合您策略的方法
- **实时警报**:当不同结构级别形成背驰形态时立即获得通知
- **完美同步**:自动与主指标的结构分析同步
**核心功能:**
- 带背驰可视化的MACD柱状图
- 笔/线段/趋势级别背驰跟踪
- 一类信号背驰确认
- 可自定义背驰检测方法
- 多周期背驰警报
- 简洁、无干扰的副图设计
## 核心功能
### 1. MACD背驰可视化
直接在MACD柱状图上显示背驰关系:
- **笔背驰**:比较连续笔之间的MACD
- **线段背驰**:识别线段完成时的背驰
- **趋势背驰**:检测主要趋势衰竭信号
### 2. 四种背驰检测方法
| 方式 | 说明 |
|------|------|
| **振幅背驰** | 比较价格振幅 |
| **MACD面积背驰** | 比较MACD柱状图面积总和 |
| **MACD柱体** | 比较柱状图峰值(推荐) |
| **任一方式** | 任一方法显示背驰时触发 |
> **使用技巧**:MACD柱体方式配合本副图指标使用最直观,因为您可以直观地看到柱状图峰值比较。
### 3. 一类信号要求
配置一类信号形成条件:
- **必须有中枢**:线段必须包含至少一个中枢
- **有中枢或3笔以上**:线段有中枢或包含3笔以上
- **有中枢或5笔以上**:线段有中枢或包含5笔以上
### 4. 警报系统
全面的背驰警报:
- **次级别背驰**:笔级别背驰警报
- **本级别背驰**:线段级别背驰警报
- **大级别背驰**:趋势级别背驰警报
- **多级别共振**:跨级别背驰对齐时警报
## 设置参考
### 显示设置
| 设置项 | 说明 |
|--------|------|
| 急速成笔 | 允许无完整分型成笔 |
| 笔的类型 | 老笔/新笔/4K/5K/严笔 |
| 单笔成段 | 启用级别升级功能 |
### 背驰设置
| 设置项 | 说明 |
|--------|------|
| 背驰判断方式 | 振幅/MACD面积/柱体/任一 |
| 一类中枢要求 | 中枢或笔数要求 |
| 启用背驰检查 | 强制一类背驰验证 |
### 警报设置
| 设置项 | 说明 |
|--------|------|
| 预期与确认 | 预期/确认/全部信号警报 |
| 显示预期信号 | 显示预期背驰形态 |
## 使用方法
### 设置步骤
1. 在主图添加 "Chan Theory - Chanlun MAX | CJZT"
2. 在副图添加本 "Chan Theory MACD Divergence | CJZT" 指标
3. 两个指标将自动同步其结构分析
> **重要提示**:两个指标的默认设置已保持一致。如果您需要修改配置(如笔的类型、单笔成段条件等),请确保在主图和副图指标中同时进行相同的修改,以保持结构分析的同步。
### 读取背驰
- **背驰线**:连接显示背驰的MACD峰值/谷值
- **背驰标签**:显示背驰类型和强度
- **颜色编码**:视觉区分多头/空头背驰
### 最佳实践
- 使用MACD柱体方式获得最清晰的视觉确认
- 关注多级别背驰共振以获得最强信号
- 结合主指标的一类信号进行入场确认
- 为您偏好的背驰检测方法设置警报
## 原创性声明
本指标是专为缠论背驰分析设计的原创实现,具有标准MACD指标所没有的独特功能:
**1. 结构同步分析**
与主图缠论指标自动同步,使用相同的K线包含处理和分型识别逻辑
**2. 多级别背驰可视化**
在MACD柱状图上绘制背驰线、标签,跟踪笔/线段/趋势三个级别的背驰
**3. 四种背驰检测方法**
提供振幅、MACD面积、MACD柱体、任一方式四种选择
**4. 预期信号系统**
在完全确认前显示预期背驰形态,提前准备交易
**5. 配套指标设计**
专门设计用于配合主图缠论指标,两者结合实现完整分析
## 免责声明
- 本脚本仅供技术分析参考
- 不构成投资建议或交易推荐
- 背驰信号应结合价格行为确认
- 用户应自行做出交易决策并管理风险
- 建议用于教育目的和作为辅助分析工具
Big Move Spot-By TARA-SwingLab FrameworkThis advanced Pine Script v6 indicator fuses Pivot Boss Day Types (TR/WD/MD/TD/RD) with a proprietary *Scoring Engine* (up to 100+ boost) for precise entries.
*Key Features:*
- *Day Classification:* Auto-detects Trader Day (low gap), Weak/Strong trends via gap analysis
- *Multi-Factor Score:* RSI (multi-TF), Volume surge, ATR expansion, Gap + Momentum
- *Visual Signals:* Strong/Medium Bull/Bear shapes + Background colors + Real-time Table (Gap%, Prob%, Action: ENTER NOW/PREPARE/WAIT)
- *Session Filter:* 9:15-14:00 IST only
- *Alerts:* "🚀 STRONG BULL NIFTY TD Score:92 LONG!"
*Backtested Edge:* 3:1 R:R targets, 60-75% prob moves on non-TR days.
Perfect for intraday traders! Scalping & Directional Trading.
Source protected.
Kalman Hull Trend Score [BackQuant]Kalman Hull Trend Score
Overview
Kalman Hull Trend Score is a trend-strength and regime-evaluation indicator that combines two ideas, Kalman filtering and Hull-style smoothing, then measures persistence of that filtered trend using a rolling score. The goal is to produce a cleaner, more stable trend read than typical moving average tools, while still reacting fast enough to be practical in live markets.
Instead of treating a moving average as a simple line you cross, this indicator turns the filtered trend into an oscillator-like score that answers: “Is the smoothed trend consistently progressing, or is it stalling and degrading?”
Core idea
The indicator is built from two components:
A Kalman-based smoothing engine that estimates price state and reduces noise adaptively.
A Hull-style construction that uses multiple Kalman passes to create a responsive, low-lag trend filter.
Once the Kalman Hull filter is built, a persistence score is calculated by comparing the current Kalman Hull value to many past values. The result is a trend score that rises in sustained trends and compresses or flips during deterioration.
Why Kalman instead of standard smoothing
Traditional moving averages apply fixed smoothing rules regardless of market conditions. A Kalman filter behaves differently, it is designed to estimate an underlying state in noisy data, adjusting how much it “trusts” new price information versus prior estimates.
This script exposes that behavior through two key controls:
Measurement Noise: how noisy the observed price is assumed to be.
Process Noise: how much the underlying state is allowed to evolve from bar to bar.
Together, these settings let you tune the balance between smoothness and responsiveness without relying on blunt averaging alone.
Kalman filter mechanics (conceptual)
Each update cycle follows the classic structure:
Prediction: assume the state continues, and expand uncertainty by process noise.
Update: compute Kalman Gain, then blend the new price observation into the estimate.
Correction: reduce uncertainty based on how much the filter accepted the new information.
When measurement noise is higher, the filter becomes more conservative, smoothing harder. When process noise is higher, the filter adapts faster to regime changes, but can become more reactive.
Check out the original script:
Kalman Hull construction
The “Hull” component is not a standard HMA built from WMAs. Instead, it recreates the Hull idea using Kalman filtering as the smoothing primitive. The structure follows the same intent as HMA, reduce lag while keeping the line smooth, but does it with Kalman passes:
Apply Kalman smoothing over multiple effective lengths.
Combine them using the Hull-style weighting logic.
Run the combined output through another Kalman pass to finalize smoothing.
The result is a Kalman Hull filter that aims to track trend with less jitter than raw price, and less lag than slow averages.
Another Kalman Hull with Supertrend
Trend scoring logic
The trend score is computed by comparing the current Kalman Hull value to past Kalman Hull values over a fixed lookback range (1 to 45 bars in this script):
If current kalmanHMA > kalmanHMA , add +1
If current kalmanHMA < kalmanHMA , add -1
This produces a persistence score rather than a simple direction signal. Strong trends where the filter keeps advancing will accumulate positive comparisons. Weak trends, chop, or reversals will cause the score to flatten, decay, or flip negative.
Interpreting the score
Read the score as trend conviction and persistence:
High positive values: bullish persistence, the filtered trend is progressing consistently.
Low positive values: trend exists but is fragile, progress is slowing.
Near zero: indecision, range behavior, frequent challenges to structure.
Negative values: bearish persistence or sustained deterioration in the filtered trend.
The rate of change matters:
Score expansion suggests trend is gaining traction.
Score compression often signals consolidation or exhaustion.
Fast flips usually accompany regime transitions.
Signal thresholds and regime transitions
User-defined thresholds convert the score into regimes:
Long threshold: score must exceed this level to confirm bullish persistence.
Short threshold: a crossunder of the score triggers bearish regime transition.
This is intentionally conservative. Long bias is maintained while the score holds above the long threshold. Short transitions are event-triggered on breakdown via crossunder, helping avoid constant flipping during minor noise.
Signals are only plotted on regime changes (first bar of the flip), keeping them clean for alerts and backtests.
Visual presentation
The indicator provides multiple layers depending on how you want to use it:
Kalman Hull Trend Score oscillator, color-coded by active regime.
Optional Kalman Hull filter plotted on the price chart for structure context.
Optional threshold reference lines for quick regime mapping.
Optional candle coloring and background shading for instant readability.
You can run it as a pure score panel or as a combined panel + on-chart trend overlay.
How to use in practice
Trend filtering
Favor long setups when the score remains above the long threshold.
Reduce directional aggression when score compresses toward zero.
Treat a short-threshold breakdown as a regime risk event, not just a signal.
Trend quality assessment
Rising score supports continuation trades and adds confidence to breakouts.
Flat or falling score warns that trend persistence is fading.
If price trends but score fails to expand, trend may be weak or liquidity-driven.
Trade management
Use the Kalman Hull line as dynamic structure reference on chart.
Use score deterioration to scale out before a full regime flip.
Use regime flips as confirmation for bias shifts rather than prediction.
Tuning guidelines
Measurement Noise
Higher: smoother filter, fewer false shifts, slower to adapt.
Lower: more responsive, more sensitive to microstructure noise.
Process Noise
Higher: adapts quicker to sudden changes, but can become twitchy.
Lower: steadier state estimate, but slower during sharp regime transitions.
A practical approach is to first tune measurement noise until the Kalman Hull line matches the “clean trend structure” you want, then adjust process noise to control how quickly it reacts when the regime genuinely changes.
Summary
Kalman Hull Trend Score transforms a Kalman-based Hull-style trend filter into a quantified persistence oscillator. By combining adaptive Kalman smoothing with low-lag Hull logic and a rolling comparison score, it provides a cleaner read on trend quality than basic moving averages or single-condition trend tools. It is best used as a regime filter, trend strength gauge, and structure-aware trade management layer.
Longer EMA/MA (SurfXBT)A long-term trend indicator based on MA 100, EMA 200, and MA 300.
It also includes an option to display the 4H EMA 200 across all timeframes for higher-timeframe trend orientation.
Local Trend (SurfXBT)Local Trend is a trend-following indicator based on the EMA 13, 25, and 36. It features and optional trend cloud, that changes color to reflect whenever the short term EMA is above the slowest one or the opposite.
Chan Theory - Chanlun MAX | CJZT# Chan Theory - Chanlun MAX | CJZT
## Overview
This is the full-featured version of Chan Theory (缠论) structural analysis indicator, built with Pine Script v6. It provides comprehensive multi-level structure recognition including fractals, pens, segments, trend lines, super trend lines, and pivot zones across three levels. The indicator offers advanced trading signal detection with customizable filtering options and MACD divergence analysis.
**Why This Indicator?**
Real market movements rarely follow textbook patterns. This indicator addresses this reality with:
- **Single Pen to Segment**: When a powerful pen breaks the previous level's extreme or meets K-line count requirements, it can directly become a segment - no need to wait for the standard 3-pen structure
- **9-Pen Segment to Trend**: A segment containing 9+ pens can upgrade to trend line level, enabling better same-level decomposition
- **Flexible Level Upgrade**: Multiple conditions (extremum breakthrough, count requirements, or either) allow the structure to adapt to actual market behavior
- **4K/5K Pen Types**: Designed to better fit sub-cycle and sub-sub-cycle movements with shorter K-line requirements
- **Top/Bottom to Pen**: When top/bottom fractal strength is significant, allows pen formation even with insufficient K-line count based on amplitude ratio
- **Main Chart MACD Divergence**: Displays divergence pens/segments directly on K-line chart, comparing entry and exit pen momentum for visual divergence confirmation
- **Sub-Chart MACD Indicator**: Works with the companion Chan Theory MACD sub-chart indicator for consolidation/trend divergence analysis on the MACD histogram
These features enable more accurate fitting of irregular market movements, proper same-level decomposition (同级别分解), and better alignment with sub-cycle structures - essential for practical Chan Theory application.
**Key Features:**
- 5 pen types: Classic, Optimized, 4K, 5K, Strict
- 3 segment modes: Dynamic Correction, Strict, Extension
- 3-level structure: Segments → Trend Lines → Super Trend Lines
- 3-level pivot zones with extension detection
- Complete Type I/II/III trading signals across all levels
- MACD divergence analysis for signal confirmation
- Advanced signal filtering system
- Real-time alerts for all trading signals
## Core Functions
### 1. Candlestick Containment Processing
Advanced containment processing with configurable options:
- **Left Containment**: Standard processing
- **Right Containment Check**: Optional additional validation
- Recursive processing ensures complete elimination
### 2. Pen Construction (5 Types)
| Type | Description |
|------|-------------|
| **Classic (老笔)** | 5+ processed K-lines per pen |
| **Optimized (新笔)** | 4+ processed + 5+ raw K-lines |
| **4K** | 4 raw K-lines with extremum validation |
| **5K** | 5 raw K-lines standard |
| **Strict (严笔)** | 5+ K-lines with directional validation |
### 3. Pen Endpoint Mode
- **Strict Highest/Lowest**: Pen endpoints must be absolute extremes
- **Allow Secondary High/Low**: Flexible endpoint detection when K-line count insufficient
### 4. Single Pen to Segment
Advanced level upgrade conditions:
- **Extremum Breakthrough**: Break previous level extreme
- **Count Condition**: Meet K-line/pen count requirements
- **Either Satisfied**: Flexible combination
### 5. Three-Level Segment System
- **Segments (线段)**: Grouped from pens
- **Trend Lines (趋势线)**: Grouped from segments
- **Super Trend Lines (大趋势线)**: Highest level structure
### 6. Segment Modes
| Mode | Description |
|------|-------------|
| **Dynamic Correction** | Real-time adjustment with correction |
| **Strict Mode** | Full classical compliance |
| **Extension Mode** | Flexible trend continuation |
### 7. Three-Level Pivot Zones
- Sub-level (pen-based) pivot zones
- Main-level (segment-based) pivot zones
- Big-level (trend-based) pivot zones
- Pivot extension detection and visualization
- Early pivot drawing options
## Trading Signal System
### Type I Signals (1buy/1sell)
Trend reversal based on divergence:
- Multiple divergence detection methods
- Configurable pivot/pen count requirements
- MACD area or amplitude comparison
### Type II Signals (2buy/2sell)
Pullback entries with chain detection:
- Standard Type II at position 2
- Type II chain continuation (position 4, 6, 8...)
- Automatic chain termination on Type III
### Type III Signals (3buy/3sell)
Breakout confirmations:
- Configurable search range (3-11 pens)
- Gap detection for confirmation
- Pivot zone boundary breaks
### Type I Divergence Methods
| Method | Description |
|--------|-------------|
| **Amplitude** | Compare price range |
| **MACD Area** | Compare MACD histogram sum |
| **Either** | Any method satisfied |
| **MACD Histogram** | Compare peak histogram values |
> **Pro Tip**: The MACD Histogram method works best when used together with the Chan Theory MACD sub-chart indicator, which visualizes the divergence relationship making it easier to confirm Type I signals visually.
## Signal Filtering System
### Fractal Filters
- **Fractal Validity Filter**: Post-fractal price confirmation
- **Basic Fractal Filter**: K-line color validation
### MACD Filters
- **Type I MACD Divergence**: Confirm divergence with MACD
- **Type II Zero-Axis**: MACD polarity confirmation
### Safety Filters
- **False Signal Avoidance (防狼术)**: MACD direction alignment
### Expected Signal System (预期买卖点)
A unique early-warning mechanism that identifies potential trading signals before full fractal confirmation:
- **Early Detection**: When a pen completes but the fractal is not yet confirmed, the system generates an "expected signal"
- **Multi-Timeframe Validation**: Traders can switch to the sub-timeframe or sub-sub-timeframe to check for divergence patterns, enabling earlier entries with confluence confirmation
- **Risk-Reward Optimization**: Expected signals allow preparation for high-probability setups while awaiting formal confirmation
- **Separate Alert Channels**: Expected and confirmed signals can be routed to different alert outputs for workflow customization
## Alert System
Comprehensive real-time notification system with full customization:
### Multi-Level Coverage
- All Type I/II/III buy/sell signals across 3 structural levels (sub-level, main-level, big-level)
- Separate tracking for each signal type and level combination
### Expected vs Confirmed Alerts
Configure alert behavior based on signal maturity:
| Mode | Description |
|------|-------------|
| **All Alerts** | Notify on both expected and confirmed signals |
| **Confirmed Only** | Alert only when fractal is formally confirmed |
| **Expected Only** | Early notification for anticipated signals |
### Custom Alert Combinations
Create personalized alert rules by combining signals from different levels:
- **Custom Alert 1 & 2**: Define your own trigger conditions
- **Main-Level + Sub-Level Combination**: e.g., alert when main-level shows 1buy AND sub-level shows 2buy
- **10 Signal Types Available**: 1buy/sell, 2buy/sell, 3buy/sell, L2buy/sell, L3buy/sell, or None
### Multi-Level Resonance Alerts
Detect powerful confluence when signals align across multiple levels:
- **Two-Level Resonance**: Sub-level + Main-level signal alignment
- **Three-Level Resonance**: Sub-level + Main-level + Big-level all showing same direction signals
- **Subscribe All Buy/Sell Points**: One-click subscription to all signals at any level
### Special Alerts
- **Type III Rapid Reversal**: Alerts when price reverses immediately after a Type III signal
- **Expected Type I Invalidation**: Alerts when expected Type I signal is invalidated due to no divergence (trend continuation)
- **Expected Type III Disappear**: Alerts when expected Type III signal disappears before confirmation
## Advanced Features
### Segment Correction Ratio
Filter insignificant segments using Fibonacci ratios:
- Options: 38.2%, 50%, 61.8%, 78.6%, or disabled
- When current segment amplitude < previous segment × ratio, correction is triggered
### Trend Breakthrough
When enabled, if a segment breaks the trend line's starting point in the opposite direction, a new trend line is generated instead of extending the existing one
### Trend Start Filter
Prevents premature level upgrades after trend line completion:
- Filter Mode: Only filter extremum breakthrough / Filter all single-pen segments
- Ensures first reversal pen after trend completion meets additional conditions
## Settings Reference
### Display Settings
| Setting | Description |
|---------|-------------|
| Show All Fractals | Display all top/bottom fractals |
| Running Pen | Show unconfirmed forming pen |
| K-line Merge | Visualize containment process |
| Right Containment | Enable right containment check |
| Fast Pen Mode | Allow pens without complete fractals |
### Pen Settings
| Setting | Description |
|---------|-------------|
| Pen Type | Classic/Optimized/4K/5K/Strict |
| Endpoint Mode | Strict or Secondary high/low |
| Fractal Overlap | Allow fractal overlap |
| Pen Extension Fix | Enable extension correction |
### Segment Settings
| Setting | Description |
|---------|-------------|
| Segment Mode | Dynamic/Strict/Extension |
| Trend Extension | Independent trend line extension |
| Super Trend Extension | Independent super trend extension |
| Feature Sequence Gap | Gap detection for repair |
### Pivot Settings
| Setting | Description |
|---------|-------------|
| Sub-level Pivot | Pen-based pivot zones |
| Main-level Pivot | Segment-based pivot zones |
| Big-level Pivot | Trend-based pivot zones |
| Early Draw | Preview forming pivots |
### Signal Settings
| Setting | Description |
|---------|-------------|
| Type II Chain | Continue Type II after position 4 |
| Type III Range | Search range (0-11 pens) |
| Divergence Method | Amplitude/MACD Area/Either/Histogram |
| Pivot Requirement | Pivot or pen count for Type I |
## Notes
- This script is for technical analysis reference only
- Does not constitute investment advice
- Users should make independent trading decisions
- Best used in conjunction with Chan Theory MACD Divergence indicator
---
# 概述
本指标是缠论(Chan Theory)结构分析的完整功能版本,使用Pine Script v6构建。提供全面的多级别结构识别,包括分型、笔、线段、趋势线、大趋势线,以及三个级别的中枢。指标提供高级买卖点检测、可配置的过滤选项和MACD背驰分析。
**为什么选择本指标?**
实际市场走势很少完全符合教科书模式。本指标通过以下功能解决这一问题:
- **单笔成段**:当一笔的力度足够强(突破前一级别极值或满足K线数量要求),可以直接升级为线段——无需等待标准的3笔结构
- **9笔线段成趋势**:包含9笔以上的线段可以升级为趋势线级别,实现更好的同级别分解
- **灵活的级别升级条件**:多种条件(突破极值、数量要求、或任一满足)让结构适应实际市场行为
- **4K/5K笔类型**:专为更好地拟合次周期和次次周期走势设计,使用更短的K线数量要求
- **顶底成笔**:当顶底分型力度较大时,即使K线数量不足也可根据振幅比例允许成笔
- **主图MACD背驰**:在K线图上直接显示背驰的笔和段,对比进入笔和离开笔的动量,可视化确认背驰
- **副图MACD指标**:配合缠论MACD副图指标使用,在MACD柱体上进行盘整背驰或趋势背驰的分析判断
这些功能能够更准确地拟合不规则的市场走势,实现正确的同级别分解,并更好地对齐次周期结构——这对于缠论的实战应用至关重要。
**核心功能:**
- 5种笔类型:老笔、新笔、4K、5K、严笔
- 3种线段模式:当下延伸后修正、严格模式、延伸模式
- 3级结构:线段 → 趋势线 → 大趋势线
- 3级中枢及延伸检测
- 完整的一二三类买卖点(覆盖所有级别)
- MACD背驰分析用于信号确认
- 高级信号过滤系统
- 所有买卖点的实时警报
## 核心功能
### 1. K线包含处理
高级包含处理,提供可配置选项:
- **左包含**:标准处理
- **右包含检查**:可选的额外验证
- 递归处理确保完全消除包含
### 2. 笔的构建(5种类型)
| 类型 | 说明 |
|------|------|
| **老笔** | 每笔至少5根处理后K线 |
| **新笔** | 4根处理后 + 5根原始K线 |
| **4K** | 4根原始K线 + 极值验证 |
| **5K** | 5根原始K线标准 |
| **严笔** | 5根K线 + 方向验证 |
### 3. 笔端点模式
- **严格最高最低点**:笔端点必须是绝对极值
- **允许次高次低点**:K线数量不足时灵活检测
### 4. 单笔成段
高级级别升级条件:
- **突破极值**:突破前一级别极值
- **数量条件**:满足K线/笔数量要求
- **任一满足**:灵活组合
### 5. 三级线段系统
- **线段**:由笔组成
- **趋势线**:由线段组成
- **大趋势线**:最高级别结构
### 6. 线段模式
| 模式 | 说明 |
|------|------|
| **当下延伸后修正** | 实时调整并修正 |
| **严格模式** | 完全符合经典定义 |
| **延伸模式** | 灵活的趋势延续 |
### 7. 三级中枢
- 次级别(基于笔)中枢
- 本级别(基于线段)中枢
- 大级别(基于趋势)中枢
- 中枢延伸检测和可视化
- 提前绘制中枢选项
## 买卖点系统
### 一类买卖点 (1buy/1sell)
基于背驰的趋势反转:
- 多种背驰检测方法
- 可配置中枢/笔数要求
- MACD面积或振幅比较
### 二类买卖点 (2buy/2sell)
回调入场,支持链式判断:
- 标准二类在第2位置
- 二类链延续(第4、6、8...位置)
- 出现三类时自动终止链
### 三类买卖点 (3buy/3sell)
突破确认:
- 可配置搜索范围(3-11笔)
- 缺口检测确认
- 中枢边界突破
### 一类背驰判断方式
| 方式 | 说明 |
|------|------|
| **振幅背驰** | 比较价格振幅 |
| **MACD面积背驰** | 比较MACD柱状图总和 |
| **振幅或MACD面积** | 任一满足 |
| **MACD柱体** | 比较柱状图峰值 |
> **使用技巧**:MACD柱体方式配合缠论MACD副图指标使用效果更佳,副图可视化背驰关系,更容易直观确认一类买卖点。
## 信号过滤系统
### 分型过滤
- **买卖点分型过滤**:分型后价格确认
- **买卖点分型基础过滤**:K线颜色验证
### MACD过滤
- **1买卖macd背驰过滤**:用MACD确认背驰
- **2买卖点过滤**:MACD极性确认
### 安全过滤
- **防狼术**:MACD方向一致性
### 预期买卖点系统
独特的早期预警机制,在完整分型确认之前识别潜在交易信号:
- **提前识别**:当笔完成但分型尚未正式确认时,系统生成"预期信号"
- **多周期验证**:交易者可切换至次周期或次次周期确认背驰形态,实现共振确认下的更早入场
- **优化风险回报**:预期信号允许在等待正式确认的同时,为高概率交易提前做好准备
- **独立警报通道**:预期信号和确认信号可分别路由至不同警报输出,满足个性化工作流需求
## 警报系统
全面的实时通知系统,支持完整自定义配置:
### 多级别覆盖
- 覆盖3个结构级别(次级别、本级别、大级别)的所有一二三类买卖点
- 每种信号类型和级别组合独立追踪
### 预期与确认警报分离
根据信号成熟度配置警报行为:
| 模式 | 说明 |
|------|------|
| **全部警报** | 预期信号和确认信号均通知 |
| **仅正式分型** | 仅在分型正式确认后发出警报 |
| **仅预期分型** | 提前通知预期信号 |
### 自定义警报组合
通过组合不同级别的信号创建个性化警报规则:
- **自定义警报1和2**:定义自己的触发条件
- **本级别+次级别组合**:例如当本级别出现1买且次级别出现2买时触发警报
- **10种信号类型可选**:1买/卖、2买/卖、3买/卖、类2买/卖、类3买/卖、或无
### 多级别共振警报
检测多级别信号对齐时的强势共振:
- **双级别共振**:次级别+本级别信号对齐
- **三级别共振**:次级别+本级别+大级别同时出现相同方向信号
- **一键订阅所有买卖点**:一键订阅任意级别的所有信号
### 特殊警报
- **三类买卖点急速反转**:三类信号出现后价格立即反转时发出警报
- **预期一类信号失效**:当预期一类信号因不背驰被清除时发出警报(趋势延续)
- **预期三类信号消失**:当预期三类信号在确认前消失时发出警报
## 高级功能
### 线段修正比例
使用斐波那契比例过滤不显著的线段:
- 选项:38.2%、50%、61.8%、78.6%、或禁用
- 当前线段振幅 < 前一线段 × 比例时,触发修正
### 趋势突破
启用后,当线段以相反方向突破趋势线起点时,生成新趋势线而非延伸现有趋势线
### 趋势起点过滤
防止趋势线完成后过早的级别升级:
- 过滤模式:仅过滤突破极值 / 过滤所有单笔段
- 确保趋势完成后的第一个反向笔满足额外条件
## 设置参考
### 显示设置
| 设置项 | 说明 |
|--------|------|
| 显示所有顶底 | 显示所有顶底分型 |
| 运行中的笔 | 显示未确认的形成中笔 |
| 显示K线合并过程 | 可视化包含处理 |
| 启用右包含检查 | 启用右包含检查 |
| 急速成笔 | 允许无完整分型成笔 |
| **递归设置(实验性)** | |
| 启用跨周期递归 | 使用低级别趋势线作为本级别笔 |
| 递归来源周期 | 指定低级别的周期(如1分钟) |
### 分型、笔设置
| 设置项 | 说明 |
|--------|------|
| 笔的类型 | 老笔/新笔/4K/5K/严笔 |
| 笔端点模式 | 严格或次高次低 |
| 允许分型重叠 | 允许分型重叠 |
| 笔延伸修正 | 启用延伸修正 |
### 线段设置
| 设置项 | 说明 |
|--------|------|
| 线段模式 | 当下延伸后修正/严格/延伸 |
| 趋势线延伸 | 独立趋势线延伸控制 |
| 大趋势线延伸 | 独立大趋势线延伸控制 |
| 特征序列缺口检测 | 缺口检测用于修复 |
### 中枢设置
| 设置项 | 说明 |
|--------|------|
| 次级别中枢 | 基于笔的中枢 |
| 本级别中枢 | 基于线段的中枢 |
| 大级别中枢 | 基于趋势的中枢 |
| 提前绘制 | 预览形成中的中枢 |
### 买卖点设置
| 设置项 | 说明 |
|--------|------|
| 启用类2链式判断 | 第4位置后继续类2 |
| 类3搜索范围 | 搜索范围(0-11笔) |
| 背驰判断方式 | 振幅/MACD面积/任一/柱体 |
| 中枢要求 | 一类的中枢或笔数要求 |
## 声明
- 本脚本仅供技术分析参考
- 不构成投资建议
- 用户应自行做出交易决策
- 建议结合缠论MACD背驰指标使用
Trend EASY-SYSTEM [iss2k]Trend EASY-SYSTEM – Indicator Overview
Trend EASY-SYSTEM is a complete, rule-based trading indicator designed to identify market trends, manage trades visually, and highlight high-probability entry and exit zones.
It combines trend structure, momentum, volatility, and market behavior into one clean and easy-to-use system.
The indicator is built for traders who want clarity, discipline, and consistency without chart clutter.
How the Indicator Works
1. Smart Trend Detection
The system analyzes price structure using a dynamic price channel and Fibonacci levels to determine the current market direction.
Automatically identifies bullish, bearish, or neutral trends
Filters out sideways market noise
Clearly visualizes the active trend directly on the chart
The trend line dynamically adapts to market conditions, making it suitable for both trending and volatile markets.
2. Trend Entry Signals
When a new trend is confirmed, the indicator generates clear:
TREND-LONG signals for bullish setups
TREND-SHORT signals for bearish setups
Signals are only triggered on real trend transitions, preventing repeated entries in the same direction.
3. Automatic Trade Structure (Entry, SL & Take Profits)
Each new trend signal automatically builds a full trade framework:
Entry level
Stop-Loss level
Up to 6 Take-Profit targets
All targets are calculated using risk-based R-multiples, allowing traders to:
Scale out profits
Manage risk professionally
Maintain consistent reward-to-risk ratios
This turns the indicator into a visual trade management tool, not just a signal generator.
4. EMA Cloud Trend Filter
A built-in EMA cloud provides additional trend confirmation:
Bullish cloud → trend strength confirmation
Bearish cloud → downside momentum confirmation
This helps traders stay aligned with the dominant market direction and avoid counter-trend trades.
5. RSI Momentum Confirmation
The indicator includes RSI-based signals to highlight:
Oversold conditions during bullish trends
Overbought conditions during bearish trends
These signals act as confirmation and timing tools, improving entry quality and confidence.
6. Market Structure & Peak Detection
Trend EASY-SYSTEM continuously tracks price peaks and exhaustion points:
Detects when momentum starts to weaken
Marks potential BUY-POINTS and SELL-POINTS
Highlights areas where trends may stall or reverse
This feature is especially useful for:
Partial profit taking
Trade exits
Reversal awareness
7. Visual Clarity & Bar Coloring
The indicator uses dynamic bar coloring and labels to instantly communicate market conditions:
Strong trend continuation
Momentum slowdown
Potential exhaustion zones
Everything is designed to be clear at a glance, even during fast market movement.
8. Built-In Alerts
Custom alerts notify you of:
New trend signals
Buy points
Sell points
Alerts only trigger on confirmed candles, reducing false notifications.
Who This Indicator Is For
✔ Trend traders
✔ Swing traders
✔ Intraday traders
✔ Traders who want structured entries and exits
✔ Traders who value visual trade management
Key Benefits
✅ Clear trend direction
✅ Reduced market noise
✅ Professional risk management visualization
✅ No over-signaling
✅ Clean, intuitive chart display
✅ Works on multiple timeframes
Summary
Trend EASY-SYSTEM is more than just an indicator —
it is a complete trend-based trading system that guides you from trend detection to trade management and exit planning, all in one tool.
Perfect for traders who want simplicity, structure, and consistency in their trading decisions.
DARVAS BOX THEORY PROThis indicator automatically draws price boxes that update in real-time, identifies breakouts based on Nicolas Darvas' famous Box Theory and simplified for ease of use with visual identifiers.
DARVAS BOX THEORY PRO - Complete User Guide
⚡ TWO POWERFUL MODES ⚡
📊 SIMPLE DAILY MODE
• Track today's high/low in REAL-TIME (Days Back = 0).
• Or use yesterday's range as support/resistance (Days Back = 1).
• Perfect for day trading & scalping.
• Works on ANY timeframe (1m, 5m, 15m, 1H, 4H, etc.).
📈 TRUE DARVAS MODE
• Authentic 52-week high detection.
• 3-bar confirmation rule (original Darvas method).
• Ideal for swing trading & position trading.
• Best on Daily/Weekly charts.
✨ KEY FEATURES ✨
✅ Auto-Drawing Boxes - No manual drawing needed.
✅ Live Updating - Box expands as price makes new H/L.
✅ Volume Confirmation - Filter out weak breakouts.
✅ Clear Signals - BUY 🟢 / SELL 🔴 / STOP ❌ markers.
✅ Risk Management - Auto stop-loss calculation.
✅ Avoid Zone - Orange middle line shows where NOT to trade.
✅ Info Panel - All key data at a glance.
✅ Fully Customizable - Colors, sizes, positions.
📋 QUICK START GUIDE 📋
1️⃣ Add indicator to chart
2️⃣ Choose your mode:
• Day Trading → "Simple Daily" + Days Back = 0 or 1
• Swing Trading → "True Darvas"
3️⃣ Watch for signals:
• 🟢 BUY = Price breaks above box with volume
• 🔴 SELL = Price breaks below box
• ❌ STOP = Stop loss hit
4️⃣ Follow the rules:
• ✅ Trade breakouts at box edges
• ⛔ AVOID the orange middle zone
• 🛡️ Always use the stop loss level
🎨 DISPLAY OPTIONS 🎨
• 📏 Label Size: Tiny / Small / Normal / Large
• 📊 Table Size: Tiny / Small / Normal / Large
• 📍 Table Position: Any corner
• 🎨 Custom colors for box, lines, labels
💡 PRO TIPS 💡
🔹 Days Back = 0 → Live box that updates as price moves.
🔹 Days Back = 1 → Fixed box from yesterday's range.
🔹 Enable volume confirmation to reduce false breakouts.
🔹 The middle orange line = "AVOID ZONE" - don't enter here!
🔹 Works best in trending markets 📈
📖 THE DARVAS RULES 📖
"Cut losses short, let profits run" - Nicolas Darvas
1. Buy when price breaks ABOVE the box ⬆️
2. Sell when price breaks BELOW the box ⬇️
3. Always use a stop loss 🛡️
4. Volume confirms the move 📊
5. Avoid trading in the middle of the box ⚠️
🔔 Don't forget to set up ALERTS for:
• Breakout signals
• Breakdown signals
• Stop loss hits
• Volume spikes
Happy Trading!
⚠️ DISCLAIMER ⚠️
This indicator is for educational purposes only. Trading involves substantial risk. Past performance does not guarantee future results. Always do your own research.






















