Fundur - Market Sentiment A Fundur - Market Sentiment A: Complete Trading Indicator Guide
Indicator Overview
The Fundur - Market Sentiment A is a revolutionary multi-timeframe sentiment analysis indicator that combines advanced ZigZag pivot detection, wave-based structure analysis, and comprehensive market sentiment evaluation into one powerful trading tool. This indicator is designed to identify high-probability reversal points and trend continuations by analyzing market sentiment across 11 different timeframes simultaneously.
What Makes Market Sentiment A Unique?
Market Sentiment A is a sophisticated ZigZag system that utilizes the Market Sentiment B oscillator to perform advanced on-chart analysis against price action. By introducing Histogram-Correlated ZigZag Analysis - a breakthrough methodology that correlates sentiment histogram waves with actual price pivots to identify validated market extremes. Unlike static pivot indicators, Market Sentiment A provides dynamic analysis that adapts to changing market conditions while maintaining precise accuracy in pivot identification.
Core Methodology
The indicator operates on the principle that market sentiment oscillates in measurable waves that precede price movements. By analyzing sentiment patterns across multiple timeframes and correlating them with histogram wave behavior, traders can identify precise entry and exit points with quantifiable strength ratings and comprehensive wave event analysis.
Key Features
🎯 Revolutionary ZigZag System
Histogram-Correlated Detection : Unique correlation between sentiment waves and price pivots
Dynamic Speed Control : High, Medium, Low sensitivity settings for different market conditions
Validated Extremes : Only confirmed pivots are marked with comprehensive validation system
Real-Time Correlation : Live correlation between histogram turns and price extremes
📊 Multi-Timeframe Sentiment Engine
11 Timeframe Analysis : Simultaneous analysis across periods from 8 to 987 bars
Advanced Sentiment Calculation : Proprietary algorithm combining multiple sentiment factors
Momentum Wave Integration : 34-period momentum waves for trend context
Dynamic Smoothing : Optional smoothing for cleaner signals
🧠 Intelligent Wave Event Tracking
Green Wave Events : Bullish histogram wave analysis with comprehensive event detection
Red Wave Events : Bearish histogram wave analysis with detailed event tracking
Event Deduplication : Advanced system prevents duplicate event detection
10+ Event Types : MPIV, HTURN, TRI, SW, VOL, MDIV, HDIV, PDIV and more
⚖️ Advanced Strength Rating System
0-100 Strength Score : Comprehensive strength calculation for every pivot
Multi-Factor Analysis : Based on wave events, trend context, structure, and sentiment
Real-Time Calculation : Dynamic strength scoring as conditions change
Strength Breakdown : Detailed tooltip showing strength components
🎨 Sophisticated Visual System
Validated Pivot Labels : Clear ✓ markers for confirmed extremes
Structure Analysis : HH/HL/LH/LL structure identification with trend context
Dynamic ZigZag Lines : Connecting validated extremes with trend-based coloring
Bar Coloring Options : Momentum swings and market sentiment bar coloring
Comprehensive Tooltips : Detailed information on hover for every pivot
Setup Guide
Step 1: Adding the Indicator
Open TradingView and navigate to your desired chart
Click the "Indicators" button or press "/" key
Search for "Fundur - Market Sentiment A"
Add the indicator to your chart
Step 2: Core System Configuration
ZigZag System Settings
✅ Enable ZigZag System: ON (Core functionality)
ZigZag Speed : Choose based on your trading style:
High Speed : Most sensitive, fastest detection (2-bar lookback) - Best for scalping
Medium Speed : Balanced approach (3-bar lookback) - Recommended for most traders
Low Speed : Most reliable, slower detection (4-bar lookback) - Best for swing trading
✅ Show ZigZag Lines: ON (Visual connection of validated pivots)
Bar Coloring Settings
⚠️ Momentum Swings: OFF (Avoid visual clutter initially)
✅ Market Sentiment: ON (Primary sentiment-based bar coloring)
Step 3: Label Display Configuration
Essential Labels (Recommended Settings)
✅ Show Validated Pivots (✓): ON (Core validated extremes)
⚠️ Show Potential Turns (●): OFF (Reduces noise - enable once familiar)
⚠️ Show Structure Labels: OFF (Start clean, enable for advanced analysis)
⚠️ Include Trend in Structure Labels: OFF (Advanced feature)
✅ Show Strength Rating (💪): ON (Critical for trade quality assessment)
⚠️ Show Market Sentiment Wave Events: OFF (Advanced feature for later)
Label Visual Customization
Label Coloring : Standard (Highs=Red, Lows=Green)
Label Size : Normal
Label Transparency : 0%
Text Transparency : 0%
Step 4: Alert System Setup
✅ Enable Alerts: ON
⚠️ Alert Potential Bullish Turns: OFF (Disabled by design to prevent noise)
⚠️ Alert Potential Bearish Turns: OFF (Disabled by design to prevent noise)
✅ Alert ONLY on Confirmed Extremes: ON (High-quality signals only)
✅ Include Wave Events in Confirmed Alerts: ON (Comprehensive context)
Basic Trading Guide
Understanding the Dynamic ZigZag System
Market Sentiment A is fundamentally a Dynamic ZigZag System that displays validated highs and lows on your price chart. The indicator uses Market Sentiment B wave calculations internally to determine when sentiment waves finish, but these histograms and oscillators are NOT displayed on your chart .
What You See on Your Chart:
✓ Validated Highs : Red checkmarks marking confirmed resistance levels
✓ Validated Lows : Green checkmarks marking confirmed support levels
ZigZag Lines : Connecting validated extremes to show market structure
💪 Strength Ratings : 0-100 scores indicating signal quality
Structure Labels : HH/HL/LH/LL showing trend context
How Validation Works (Behind the Scenes):
High Validation : Uses Market Sentiment B wave analysis to confirm when a price high represents a true resistance level
Low Validation : Uses Market Sentiment B wave analysis to confirm when a price low represents a true support level
Dynamic Detection : Continuously monitors sentiment waves to validate extremes in real-time
Quality Filtering : Only displays the most significant highs and lows based on wave completion
Key Trading Concept:
Focus entirely on the validated highs and lows displayed on your chart. These represent dynamic support and resistance levels that have been confirmed by underlying sentiment analysis. The histogram and oscillator calculations happen internally - your trading decisions should be based on price action around these validated levels.
Entry Strategies
Primary Strategy: Dynamic Support/Resistance Reversals
Setup : Wait for validated pivot with ✓ marker and strength rating displayed on chart
Entry Timing : Enter on the bar when validation occurs or on pullback to the validated level
Direction : Counter-trend to the validated extreme (buy at validated lows/support, sell at validated highs/resistance)
Confirmation : Look for strength rating above 60 for higher probability setups
Structure Context : Consider overall trend using HH/HL/LH/LL structure labels
Secondary Strategy: ZigZag Trend Continuation
Setup : Identify trend direction using consecutive validated highs and lows
Entry : Enter in trend direction when price pulls back to previous validated level
Confirmation : Look for structure labels confirming trend (HH/HL for uptrend, LH/LL for downtrend)
Strength Filter : Use strength ratings above 70 for trend continuation entries
Stop Loss Methodology
For Long Positions (Validated Lows) : Place stop below the validated low price level
For Short Positions (Validated Highs) : Place stop above the validated high price level
Alternative Method : Use previous validated extreme in opposite direction as stop level
Structure-Based Method : Use significant validated levels that would invalidate the trade setup
Buffer Consideration : Add small buffer beyond validated level to account for wicks and spread
Profit Taking Strategy
For Long Positions (Validated Low Entries):
Target 1 : Previous validated high shown on chart (75% of position)
Target 2 : Next significant validated high or key resistance level (50% of remaining 25% = 12.5% of original position)
Target 3 : Extended targets using ZigZag structure analysis and trend context (remaining 12.5% of original position)
Management : Move stop loss to breakeven once first target (TP1) is executed
For Short Positions (Validated High Entries):
Target 1 : Previous validated low shown on chart (75% of position)
Target 2 : Next significant validated low or key support level (50% of remaining 25% = 12.5% of original position)
Target 3 : Extended targets using ZigZag structure analysis and trend context (remaining 12.5% of original position)
Management : Move stop loss to breakeven once first target (TP1) is executed
ZigZag Structure Trading Approach
Sideways Markets : Trade between validated highs and lows - buy at support, sell at resistance
Trending Markets : Use validated levels as pullback entry points in trend direction
Structure Breaks : Watch for breaks of significant validated levels to signal trend changes
Range Identification : Use consecutive validated highs and lows to identify trading ranges
Breakout Trading : Enter when price breaks beyond validated levels with strong momentum
Strength Rating Interpretation
Understanding the 0-100 Strength Score
The strength rating combines multiple factors:
Base Strength (25 points) : Fundamental pivot validation
Wave Events (12 points each) : Number and quality of wave events detected
Trend Context (5-10 points) : Alignment with overall trend direction
Structure Quality (3-8 points) : HH/HL/LH/LL structure strength
Sentiment Position (5-10 points) : Extreme sentiment readings
Momentum Context (5 points) : Momentum divergence confirmation
Strength Categories
90-100 : Exceptional strength - Highest probability setups
75-89 : Strong signal - High confidence trades
60-74 : Good signal - Solid trading opportunities
45-59 : Moderate signal - Use additional confirmation
30-44 : Weak signal - Proceed with caution
Below 30 : Very weak - Generally avoid
Wave Event Reference (Calculation Background)
Understanding Wave Events in Strength Calculations
Wave events are used internally by Market Sentiment A to calculate strength ratings and validate pivots. While these events may appear in alert messages or tooltips, they are not meant for direct trading decisions - they are calculation components that contribute to the overall strength score.
Key Wave Events (For Reference Only)
MPIV↑/MPIV↓ : Momentum pivot detection used in validation process
HTURN : Histogram turn identification used for wave completion
TRI↑/TRI↓ : Triangle pattern detection contributing to strength calculation
SW : Small wave indication affecting pivot quality assessment
VOL : Volume spike detection adding to strength scoring
MDIV↑/MDIV↓ : Momentum divergence contributing to validation strength
HDIV↑/HDIV↓ : Histogram divergence used in pivot confirmation
PDIV↑/PDIV↓ : Price divergence analysis for strength enhancement
How Wave Events Affect Your Trading
Strength Score Impact : More events generally result in higher strength ratings for validated pivots
Alert Context : Events may be mentioned in alerts to provide background on signal quality
Focus on Results : Instead of analyzing individual events, focus on the final strength rating and validated pivot levels
Trust the System : The indicator processes these events automatically - your job is to trade the validated highs and lows
Analysis Setups
Setup 1: Scalping Configuration (1-5 minute charts)
Core Settings:
ZigZag Speed: High (fastest detection for quick scalps)
Show Validated Pivots: ON
Show Strength Rating: ON
Bar Coloring: Market Sentiment
Visual Settings:
Label Size: Small (reduce visual clutter)
ZigZag Lines: ON
Potential Turns: ON (for immediate signals)
Trading Approach:
Focus on strength ratings above 70 for scalp entries
Quick entries at validated highs/lows with immediate execution
Tight stops just beyond validated levels
Target previous validated pivots shown on chart for quick profits
Use ZigZag structure to identify rapid reversal opportunities
Setup 2: Day Trading Configuration (5-15 minute charts)
Core Settings:
ZigZag Speed: Medium (balanced approach)
Show Validated Pivots: ON
Show Strength Rating: ON
Include Wave Events: ON (for context)
Visual Settings:
Label Size: Normal
Show Structure Labels: ON (for trend context)
ZigZag Lines: ON with trend coloring
Trading Approach:
Wait for strength ratings above 60 for quality setups
Use HH/HL/LH/LL structure labels for trend bias
Combine reversal trades at extremes with trend continuation at pullbacks
Hold positions targeting next validated pivot levels
Use ZigZag structure analysis for entry timing and market context
Setup 3: Swing Trading Configuration (1-4 hour charts)
Core Settings:
ZigZag Speed: Low (most reliable signals)
Show Validated Pivots: ON
Show Structure Labels: ON
Include Trend Analysis: ON
Visual Settings:
Label Size: Normal
Show all wave events for comprehensive analysis
Enable all alert types
Trading Approach:
Focus on strength ratings above 75 for swing positions
Emphasize trend continuation using ZigZag structure
Use validated level breaks for major position adjustments
Hold positions across multiple sessions targeting distant validated levels
Use comprehensive structure analysis (HH/HL/LH/LL) for entries/exits
Setup 4: Position Trading Configuration (4H-Daily charts)
Core Settings:
ZigZag Speed: Low (maximum reliability)
Show Validated Pivots: ON
Show Structure Labels: ON
Show all analysis features
Visual Settings:
Clean, comprehensive labeling
Full wave event display
Trend-based coloring for major bias
Trading Approach:
Only trade strength ratings above 80 for position entries
Focus on major ZigZag structure changes and validated level breaks
Use long-term structure analysis (HH/HL/LH/LL) for bias
Hold positions for weeks to months targeting major validated levels
Align with fundamental analysis and major market structure
Setup 5: Multi-Asset Analysis Configuration
For Forex Pairs:
Use Medium to Low speed settings
Focus on major session changes
Pay attention to news event correlation
Use strength ratings above 70
For Crypto Assets:
Medium speed for 24/7 market adaptation
Higher volatility requires strength above 75
Monitor weekend behavior patterns
Consider market sentiment cycles
For Stock Markets:
Align with market hours
Consider earnings and economic events
Use sector-specific analysis
Respect market close/open dynamics
Visual Components
Core Visual Elements
✓ Validated Pivots : Green checkmarks for confirmed lows, red for confirmed highs
● Potential Turns : Small dots showing histogram turn correlations (optional)
ZigZag Lines : Connecting validated extremes with trend-based coloring
💪 Strength Ratings : Numerical strength scores from 0-100
Structure Labels : HH/HL/LH/LL with trend context (optional)
Bar Coloring System
Market Sentiment Coloring : Based on sentiment oscillator position and momentum
Extreme Conditions : Special coloring for extreme overbought/oversold conditions
Momentum Swing Coloring : Alternative coloring based on momentum analysis
Advanced Visual Features
Wave Event Labels : Comprehensive event display within pivot labels
Trend Context : Dynamic trend identification and display
Strength Breakdown : Detailed tooltips showing strength components
Custom Coloring Modes : Standard vs trend-based coloring options
Alert System
Core Alert Types
Validated High Confirmed : When red wave validates ultimate high with full context
Validated Low Confirmed : When green wave validates ultimate low with full context
Trend Change Detected : When structure analysis detects trend shifts
Alert Message Structure
Each alert includes:
Timeframe identification
Signal type (BULLISH/BEARISH)
Structure context (HH/HL/LH/LL)
Strength score with 💪 rating
Exact price level
Wave events context (if enabled)
Setting Up Alerts
Enable desired alert types in indicator settings
Focus on "Confirmed Extremes" alerts for quality
Enable wave events for comprehensive context
Test alerts on historical data first
Set up multiple notification methods
Risk Management Framework
Strength-Based Position Sizing
Strength 90-100 : Maximum position size (3-5% risk)
Strength 75-89 : Large position size (2-3% risk)
Strength 60-74 : Standard position size (1-2% risk)
Strength 45-59 : Small position size (0.5-1% risk)
Below 45 : Avoid or minimal size (0.25% risk maximum)
Stop Loss Guidelines
Primary Method : Always use validated pivot levels for stops
Buffer Method : Add small buffer beyond validation level
Multiple Timeframe : Consider higher timeframe validated levels
Wave Event Context : Adjust stops based on event confluence
Risk-Reward Optimization
Minimum R:R : 1.5:1 for all trades
Preferred R:R : 2:1 or better for strength above 70
Exceptional Setups : 3:1+ for strength above 85
Position Management : Take 75% at TP1, 50% of remaining at TP2, close remaining at TP3
Stop Management : Move stop to breakeven after TP1 execution
Best Practices
Signal Quality Assessment
Always wait for validated pivots with ✓ checkmarks displayed on chart
Prioritize strength ratings above 60 for trade quality
Focus on the validated high/low levels rather than underlying calculations
Consider HH/HL/LH/LL structure labels for directional bias
Use ZigZag line connections to understand market structure flow
Entry Timing Optimization
Enter on validation bar or immediate pullback to validated level
Use lower timeframes for precise entry refinement around validated levels
Wait for strength score calculation completion before entry
Monitor price action around validated highs and lows
Consider multiple timeframe validated level alignment
Exit Strategy Management
Use opposite validated pivots displayed on chart as primary targets
Execute Fundur 3-stage exit: 75% at TP1, 12.5% at TP2, 12.5% at TP3
Move stop loss to breakeven immediately after TP1 execution
Monitor strength ratings of new validated levels that could reverse remaining position
Watch for structure changes (trend breaks) via HH/HL/LH/LL labels for early exit consideration
Common Mistakes to Avoid
Signal Interpretation Errors
Don't trade potential turns without ✓ validation markers
Never ignore strength ratings below 45 - they indicate weak signals
Don't chase signals after significant movement away from validated levels
Avoid overriding clear ZigZag structure and trend context
Don't ignore the relationship between consecutive validated highs and lows
Risk Management Failures
Never risk more than the strength score suggests for position sizing
Don't move stops against validated levels - they represent key structure
Avoid oversizing on "sure thing" setups - even high-strength signals can fail
Don't ignore multiple timeframe validated level context
Never trade without clear invalidation levels (validated highs/lows for stops)
System Usage Mistakes
Don't enable all features immediately - start simple
Avoid changing speed settings mid-session
Don't ignore alert system capabilities
Never disable core validation features
Don't overlook customization for your chart setup
Advanced Techniques
Multi-Timeframe ZigZag Analysis
Use higher timeframe validated levels for major bias and targets
Align lower timeframe entries with higher timeframe validated structure
Look for validated level confluence across timeframes
Monitor strength rating consistency of validated levels across periods
Advanced Structure Pattern Recognition
Identify recurring validated level patterns and their outcomes
Recognize high-probability ZigZag structure sequences
Use historical validated level patterns for target projection
Combine ZigZag analysis with other Fundur technical analysis tools
Advanced Alert Utilization
Create custom alert combinations based on strength thresholds
Use validated level break alerts for position management
Combine strength rating filters with validated pivot alerts
Develop systematic responses to different validated level types
Conclusion
The Fundur - Market Sentiment A indicator represents a breakthrough in technical analysis, providing a dynamic ZigZag system that displays validated highs and lows with unprecedented accuracy. By following the methodologies outlined in this guide and adapting the settings to your trading style, you can harness the full power of this sophisticated system for more precise and profitable trading decisions.
The key to success with Market Sentiment A lies in understanding that it is fundamentally a dynamic support and resistance system. Focus on the validated highs and lows displayed on your chart, use the strength ratings to assess signal quality, and leverage the structure analysis for trend context. Start with conservative settings, focus on high-strength signals, and gradually incorporate advanced features as you become familiar with the system's behavior across different market conditions.
Remember that this indicator provides the tools for identification and analysis - successful trading still requires proper risk management, psychological discipline, and continuous learning. Use the strength rating system as your primary guide, respect the validated pivot methodology, and always prioritize capital preservation over profit maximization.
Zig Zag Indicator
Smooth Cloud + RSI Liquidity Spectrum + Zig Zag Volume ProfileSmooth Cloud + RSI Liquidity Spectrum + Zig Zag++ Volume Profile" Indicator
| Advanced Trend & Liquidity Analysis.
---
📌 Key Features & Enhancements (Zig Zag++)
This advanced indicator combines **trend-following moving averages, RSI momentum with liquidity factors, and an improved Zig Zag++ algorithm with volume profiling** for precise swing detection.
🔹 Zig Zag++ Upgrades:
✅ **Dynamic Reversal Detection** – Adapts to volatility using percentage-based pivots.
✅ **Volume-Weighted Swing Points** – Highlights high-liquidity turning points.
✅ **Multi-Timeframe Confirmation** – Uses historical pivots for stronger signals.
✅ **Volume Profile Clustering** – Reveals key support/resistance zones based on traded volume.
---
📊 Indicator Components Breakdown
1️⃣ Smooth Cloud (Trend Filter)
- **Fast MA (20-period) & Slow MA (50-period)** – Configurable as EMA, SMA, or WMA.
- **Cloud Coloring** – Green when fast MA > slow MA (bullish), red otherwise (bearish).
- **Purpose**: Acts as a trend filter—only take trades in the direction of the cloud.
2️⃣ RSI Liquidity Spectrum (Momentum + Volume)
- **RSI (14-period default)** – Standard momentum oscillator.
- **Liquidity-Adjusted Momentum** = `(RSI + ROC(RSI,3)) * (Volume / SMA(Volume, RSI Length))`
- **Purpose**: Identifies overbought/oversold conditions with volume confirmation (high volume = stronger signal).
3️⃣ Zig Zag++ (Swing Detection & Volume Profiling)
📈 Zig Zag Logic:**
- **Percentage-Based Reversals** (default: 5%) – Only plots swings exceeding this threshold.
- **Pivot Tracking** – Stores price & bar index of each swing point in arrays.
- **Dynamic Line Drawing** – Connects swing points with yellow trendlines.
📊 Volume Profile at Swings:
- **Lookback Period** (200 bars default) – Analyzes volume distribution between Zig Zag turns.
- **10-Price Bin Clustering** – Splits the price range into 10 levels and calculates traded volume at each.
- **Transparency Scaling** – Higher volume zones appear darker (stronger support/resistance).
---
🎯 Step-by-Step Trading Strategies
📈 Strategy 1: Trend-Following with RSI Liquidity Confirmation**
1. **Enter Long** when:
- Smooth Cloud is **green** (fast MA > slow MA).
- RSI Liquidity Momentum crosses above **30** (bullish momentum + volume).
- Price pulls back to the **Volume Profile high-volume zone** (demand area).
2. **Enter Short** when:
- Smooth Cloud is **red** (fast MA < slow MA).
- RSI Liquidity Momentum crosses below **70** (bearish momentum + volume).
- Price rallies into the **Volume Profile high-volume zone** (supply area).
3. **Exit** when:
- Zig Zag++ detects a new reversal (5% move against position).
- RSI Liquidity Momentum crosses back mid-level (50).
---
📉 Strategy 2: Swing Trading with Zig Zag++ Pivots**
1. **Buy at Swing Lows** when:
- Zig Zag++ prints a **higher low** (bullish structure).
- Volume Profile shows **strong absorption** (high volume at the low).
- RSI Liquidity Momentum is rising from oversold (<30).
2. **Sell at Swing Highs** when:
- Zig Zag++ prints a **lower high** (bearish structure).
- Volume Profile shows **distribution** (high volume at the top).
- RSI Liquidity Momentum is falling from overbought (>70).
3. **Stop Loss**:
- Below the recent Zig Zag low (for longs).
- Above the recent Zig Zag high (for shorts).
---
📌 Additional Enhancements (Pro Tips)**
- **Combine with Higher Timeframe (HTF) Cloud** – Use a 4H/1D cloud to filter trades.
- **Divergence Detection** – Hidden bullish/bearish divergences between Zig Zag & RSI Liquidity.
- **Volume Spike Confirmation** – Only trade if volume exceeds SMA(volume, 20) at reversal points.
---
🚀 Conclusion
This **all-in-one indicator** provides:
✔ **Trend direction** (Smooth Cloud)
✔ **Momentum + Liquidity strength** (RSI Spectrum)
✔ **Precise swing points** (Zig Zag++)
✔ **Volume-based S/R zones** (Profile Clustering)
Best used on **15M-4H timeframes** for swing/day trading. Adjust parameters based on asset volatility.
Zig Zag with Adaptive ProjectionThe "Zig Zag with Adaptive Projection" is an advanced technical analysis tool designed for TradingView's Pine Script platform. This indicator builds upon the traditional ZigZag concept by incorporating adaptive projection capabilities, offering traders a more sophisticated approach to identifying significant price movements and forecasting potential future price levels.
At its core, the indicator utilizes a user-defined period to calculate and display the ZigZag pattern on the chart. This pattern connects significant highs and lows, effectively filtering out minor price fluctuations and highlighting the overall trend structure. Users can customize the appearance of the ZigZag lines, including their color, style (solid, dashed, or dotted), and width, allowing for easy visual integration with other chart elements.
What sets this indicator apart is its adaptive projection feature. By analyzing historical ZigZag patterns, the indicator calculates average lengths and slopes of both bullish and bearish trends. This data is then used to project potential future price movements, adapting to the current market context. The projection lines extend from the most recent ZigZag point, offering traders a visual representation of possible price targets based on historical behavior.
The adaptive nature of the projections is particularly noteworthy. The indicator considers the current trend direction, the length of the most recent ZigZag segment, and compares it to historical averages. This approach allows for more nuanced projections that account for recent market dynamics. If the current trend is stronger than average, the projection will extend further, and vice versa.
From a technical standpoint, the indicator leverages Pine Script v5's capabilities, utilizing arrays for efficient data management and implementing dynamic line drawing for both the ZigZag and projection lines. This ensures smooth performance even when analyzing large datasets.
Traders can fine-tune the indicator to their preferences with several customization options. The ZigZag period can be adjusted from 10 to 100, allowing for sensitivity adjustments to match different trading timeframes. The projection lines can be toggled on or off and their appearance customized, providing flexibility in how the forecast is displayed.
In essence, the "Zig Zag with Adaptive Projection" indicator combines traditional trend analysis with forward-looking projections. It offers traders a tool to not only identify significant price levels but also to anticipate potential future movements based on historical patterns. This blend of retrospective analysis and adaptive forecasting makes it a valuable addition to a trader's technical analysis toolkit, particularly for those interested in trend-following strategies or looking for potential reversal points.
STOCK SCHOOL | SWING TRACKER Swing Tracker is a powerful tool that automatically identifies Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL) directly on the chart, helping traders clearly understand market structure and trend direction. Designed for price action traders, it works seamlessly across all timeframes and instruments, offering clean visual labels for swing points to spot trend continuations or potential reversals. Whether you're following the trend or looking for structure shifts, Swing Tracker keeps you aligned with price action for smarter, more confident trading decisions.
Custom ZigZag IndicatorOverview
The Custom ZigZag Indicator is a technical analysis tool built in Pine Script (version 5) for TradingView. It overlays on price charts to visualize market trends by connecting significant swing highs and lows, filtering out minor price noise. This helps identify the overall market direction (uptrends or downtrends), potential reversal points, and key support/resistance levels. Unlike standard price lines, it "zigzags" only between meaningful pivots, making trends clearer.
Core Logic and How It Works
The script uses a state-machine approach to track market direction and pivots:
Initialization
Starts assuming an upward trend on the first bar.
sets initial high/low prices and bar indices based on the current bar's high/low.
Direction Tracking:
Upward Trend (direction = 1):
Monitors for new highs: If the current high exceeds the tracked high, update the high price and bar.
Checks for reversal: If the low drops below the high by the deviation percentage (e.g., high * (1 - 0.05) for 5%), it signals a downtrend reversal.
Draws a green line from the last pivot (low) to the new high.
If labels are enabled, adds a label: "HH" (Higher High if above previous high), "LH" (Lower High if below), or "H" (for the first one).
Updates the last high and switches to downward direction.
Downward Trend (direction = -1):
Monitors for new lows: If the current low is below the tracked low, update the low price and bar.
Checks for reversal: If the high rises above the low by the deviation percentage (e.g., low * (1 + 0.05)), it signals an uptrend reversal.
Draws a red line from the last pivot (high) to the new low.
If labels are enabled, adds a label: "LL" (Lower Low if below previous low), "HL" (Higher Low if above), or "L" (for the first one).
Updates the last low and switches to upward direction.
Auto Harmonic Screener - UltimateX [Trendoscope®]🎲 Introduction to Auto Harmonic Screener UltimateX
The Auto Harmonic Screener UltimateX is a sophisticated TradingView indicator designed to automatically detect and screen for a wide range of harmonic patterns across multiple zigzag levels. It builds on the foundation of harmonic trading principles, using recursive zigzag analysis to identify potential reversal zones based on Fibonacci ratios. This indicator complements the Auto Harmonic Pattern UltimateX by focusing on screening functionality rather than isolated pattern detection. This is script is designed and optimized to be used with Pine Screener
The indicator produces harmonic patterns on the chart. As an indicator, it does not offer more than what Auto Harmonic Pattern UltimateX offers. However, the major difference is that Auto Harmonic Pattern UltimateX concentrates on the usage as indicator and providing stats and back test data based on historical patterns whereas this script is optimized to be used with Pine Screener to screen across 100s of symbols at once to find out potential patterns across the market.
🎲 Core Mechanics: How the Indicator Works
🎯 Zigzag Pivot Detection
The indicator starts by calculating zigzag pivots. Zigzag identifies swing highs and lows by filtering price movements based on a minimum length (default: 8 bars) and depth (default: 100 pivots).
You can opt to use close prices instead of high/low for zigzag calculation (via Use Close Prices ), which smooths out noise in volatile markets but may miss extreme swings.
Zigzag is recursive: It begins with a base level (level 0) and generates higher levels by combining pivots from lower levels. This allows scanning for patterns at various scales, from short-term to long-term structures.
New pivots trigger pattern scans only when confirmed
🎯 Harmonic Pattern Scanning
Patterns are scanned using the last 5 zigzag pivots: X (oldest), A, B, C, D (newest)
The scan compares price ratios (e.g., AB/XA, BC/AB, CD/BC, XD/XA) against predefined Fibonacci-based ranges for each pattern type, with an adjustable error threshold (default: 8%).
Log scale scanning (Scanning under Log Scale ) can be enabled for assets with exponential growth (e.g., cryptocurrencies), ensuring ratios are calculated proportionally.
Strict mode ( Strict Ratio Scanning Mode ) disables error additions when ratio ranges vary, prioritizing accuracy over quantity of detections.
Detected patterns are stored in an array and checked for duplicates (based on pivot indices) to avoid redundancy.
The Potential Reversal Zone (PRZ) is calculated as a range where the D point should land for pattern completion.
🎯 Pattern Categories and Types
Classic Patterns : Standard harmonic formations like Gartley, Bat, Butterfly, Crab, Deep Crab, Cypher, Shark, Nenstar,
Anti/Alternate Patterns : Variations with inverted or extended ratios, such as Anti Gartley, Anti Bat, Anti Butterfly, Anti Crab, Anti Cypher, Anti Shark, Anti Nenstar, Navarro.
Non-Standard Patterns : Less common structures like 5-0, Three Drives, or Black Swan, White Swan, 121, Sea Pony, Leonardo, Total.
You can enable/disable categories or individual patterns via inputs. The indicator uses a map to track active patterns and scans only those selected
🎯 Trade Monitoring and Confirmation
Patterns identified are monitored for entry, failure and success. Patterns are kept on the chart until they are either invalidated, stopped or reaches the target. The status of the pattern is also used during the filtering of patterns using Pine Screener
🎯 Output and Signals
The following plots are displayed in data window mode. These plots are used in Pine Screener for filtering symbols based on the presence of patterns.
Bullish (Awaiting Entry) : Plots 1 if there is a bullish pattern awaiting entry
Bullish (In Trade) : Plots 1 if there is a bullish pattern that has reached Entry and in trade.
Bearish (Awaiting Entry) : Plots 1 if there is a bearish pattern awaiting entry
Bearish (In Trade) : Plots 1 if there is a bearish pattern that has reached Entry and in trade.
🎲 Detailed Input Parameters
The indicator offers extensive customization through grouped inputs. Here's a breakdown:
🎯 Zigzag Parameters :
Use Close Prices (bool, default: false): Switches zigzag to use close prices for pivots, reducing sensitivity to wicks.
Length (int, default: 8, min: 3): Minimum bars between pivots; higher values filter more noise but may miss small patterns.
Depth (int, default: 100, max: 500): Maximum pivots stored; affects recursive zigzag levels and performance.
🎯 Generic Settings
Base (string, default: 'correction'): Determines the wave (impulse/correction) used for target projections. Options include 'min'/'max' for conservative/aggressive targets, or 'AD'/'CD' for specific legs.
Error Percent (int, default: 8, 0-20): Tolerance for ratio matches; lower = fewer but more accurate patterns.
Strict Ratio Scanning Mode (bool, default: false): Enforces exact ratios without error buffer for varying ranges.
Log Scale (two bools): Separate toggles for scanning patterns vs. projecting targets.
🎯 Trade Settings
Stop/Entry/Target (floats): Ratios for trade levels (stop=0.0 default, entry=0.3, target=0.618). Stop at 0.0 means no stop (use with caution); entry/target based on PRZ extension.
🎯 Display Settings
Draw (bool, default: true): Enables pattern drawings. When running in pine screener, this can be turned off
Theme (enum, default: DARK): Auto-generates colors (light/dark shades); or CUSTOM with 22 user-defined colors.
XABCD/Ratios (bools, default: true): Show/hide pivot labels and ratio annotations.
Label Size (string, default: small): Size for on-chart labels (tiny to huge).
🎲 Using with Pine Screener
Pine Screener is a powerful tradingview utility that allows users to build complex programmable screeners using Pinescript®. This script is designed in an optimized way in order to work with Pine Screener. Hence, the display of the indicator is limited. In order to use this script with pine screener, we need to follow these steps.
Prepare your watchlist
Pine screener works on a watchlist with less than 1000 symbols in them. We can use built-in tradingview screeners to perform initial screening based on broad categories. This can be as simple as filtering based on market cap. This initial filtering is only required if the number of symbols are more than 1000.
Load the watchlist and indicator to pine screener
Go to screener menu and load Pine Screener.
Once done, load the watchlist and indicator. Set filtering criteria, timeframe and indicator settings. And then press Scan to filter the symbols that match given criteria.
For more details, please watch the video published under the below idea.
Pattern Detector [theUltimator5]🎯 Overview
The Pattern Detector is a comprehensive technical analysis indicator that automatically identifies and visualizes multiple pattern types on your charts. Built with advanced ZigZag technology and sophisticated pattern recognition algorithms, this tool helps traders spot high-probability trading opportunities across all timeframes and markets.
✨ Key Features
🔍 Multi-Pattern Detection System
Harmonic Patterns: Butterfly, Gartley, Bat, and Crab patterns with precise Fibonacci ratios
Classic Reversal Patterns: Head & Shoulders and Inverse Head & Shoulders
Double Patterns: Double Tops and Double Bottoms with extreme validation
Wedge Patterns: Rising and Falling Wedges with volume confirmation
📊 Advanced ZigZag Engine
Customizable sensitivity (5-50 levels)
Depth multiplier for multi-timeframe analysis
Real-time pivot detection with noise filtering
Option to display ZigZag lines only for pure price action analysis
🎨 Visualization
Clean pattern lines with distinct color coding
Point labeling system (X, A, B, C, D for harmonics / LS, H, RS for H&S)
Pattern name displays with bullish/bearish direction
Price target projections with arrow indicators
Subtle pattern fills for enhanced visibility
🛠️ Settings & Configuration
Core ZigZag Settings
ZigZag Sensitivity (5-50): Controls pattern detection sensitivity. Lower values detect more patterns but may include noise. Higher values focus on major swings only.
ZigZag Depth Multiplier (1-5): Multiplies sensitivity for deeper analysis. Level 1 = most responsive, Level 5 = major swings only.
Pattern Detection Toggles
Show ZigZag Lines Only: Displays pure ZigZag without pattern detection for price structure analysis
Detect Harmonic Patterns: Enable/disable Fibonacci-based harmonic pattern detection
Detect Head & Shoulders: Toggle classic reversal pattern identification
Detect Double Tops/Bottoms: Enable double pattern detection with extreme validation
Detect Wedge Patterns: Toggle wedge pattern detection with volume confirmation
Display Options
Show Pattern Names: Display pattern names directly on chart (e.g., "Butterfly (Bullish)")
Show Point Labels: Add lettered labels at key pattern points for structure identification
Project Harmonic Targets: Show projected completion points for incomplete harmonic patterns
📈 Pattern Types Explained
Harmonic Patterns 🦋
Advanced Fibonacci-based patterns that provide high-probability reversal signals:
Butterfly: AB=0.786 XA, BC=0.382-0.886 AB, CD=1.618-2.24 BC
Gartley: AB=0.618 XA, BC=0.382-0.886 AB, CD=1.272-1.618 BC
Bat: AB=0.382-0.50 XA, BC=0.382-0.886 AB, CD=1.618-2.24 BC
Crab: AB=0.382-0.618 XA, BC=0.382-0.886 AB, CD=2.24-3.618 BC
Head & Shoulders 👤
Classic three-peak reversal pattern indicating trend exhaustion:
Standard H&S: Bearish reversal at tops
Inverse H&S: Bullish reversal at bottoms
Automatic neckline validation and price target calculation
Double Patterns 📊
Powerful reversal patterns with extreme validation:
Double Top: Two similar highs with valley between (bearish)
Double Bottom: Two similar lows with peak between (bullish)
Includes lookback period validation to ensure patterns are significant extremes
Wedge Patterns 📐
Continuation/reversal patterns with converging trend lines:
Rising Wedge: Converging upward slopes (typically bearish)
Falling Wedge: Converging downward slopes (typically bullish)
Volume confirmation required for increased accuracy
🎯 Trading Applications
Entry Signals
Harmonic Patterns: Enter at point D completion with targets at point A
H&S Patterns: Enter on neckline break with calculated targets
Double Patterns: Enter on support/resistance break with measured moves
Wedge Patterns: Enter on breakout direction with volume confirmation
Risk Management
Use pattern structure for logical stop placement
Pattern invalidation levels provide clear exit rules
Multiple pattern confirmation increases probability
Multi-Timeframe Analysis
Higher ZigZag depth for longer-term patterns
Lower sensitivity for short-term trading patterns
Combine with other timeframes for confluence
⚙️ Optimal Settings
For Day Trading (1m-15m charts)
ZigZag Sensitivity: 5-9
Depth Multiplier: 1-2
Enable all pattern types for maximum opportunities
For Swing Trading (1H-4H charts)
ZigZag Sensitivity: 9-15
Depth Multiplier: 2-3
Focus on harmonic and H&S patterns
For Position Trading (Daily+ charts)
ZigZag Sensitivity: 15-25
Depth Multiplier: 3-5
Emphasize major harmonic and double patterns
🔧 Technical Specifications
Maximum Lookback: 5000 bars for comprehensive analysis
Pattern Overlap Prevention: Intelligent filtering prevents duplicate patterns
Performance Optimized: Efficient algorithms for real-time detection
Volume Integration: Advanced volume analysis for wedge confirmation
Fibonacci Precision: 10% tolerance for harmonic ratio validation
📚 How to Use
Add to Chart: Apply indicator to any timeframe/market
Configure Settings: Adjust sensitivity based on trading style
Enable Patterns: Toggle desired pattern types
Analyze Results: Look for completed patterns with clear structure
Plan Trades: Use price targets and pattern invalidation for trade management
Perfect for both novice and experienced traders seeking systematic pattern recognition with visualization and entry/exit signals.
Momentum Flip Pro - Advanced ZigZag Trading SystemMomentum Flip Pro - Advanced ZigZag Trading System
Complete User Guide
📊 What This Indicator Does
The Momentum Flip Pro is an advanced position-flipping trading system that automatically identifies trend reversals using ZigZag patterns combined with momentum analysis. It's designed for traders who want to always be in the market, flipping between long and short positions at optimal reversal points.
Key Features:
Automatically flips positions at each ZigZag reversal point
Dynamic stop loss placement at exact ZigZag levels
Real-time trading dashboard with performance metrics
Capital tracking and ROI calculation
Three momentum engines to choose from
🎯 How It Works
Entry Signal: When a ZigZag point appears (circle on chart), the indicator:
Exits current position (if any)
Immediately enters opposite position
Places stop loss at the exact ZigZag price
Exit Signal: Positions are closed when the next ZigZag appears, then immediately reversed
Position Management:
Long Entry: ZigZag bottom (momentum turns UP)
Short Entry: ZigZag peak (momentum turns DOWN)
Stop Loss: Always at the ZigZag entry price
Take Profit: Next ZigZag point (automatic position flip)
⚙️ Recommended Settings
For Day Trading (5m-15m timeframes):
Momentum Engine: Quantum
- RSI Length: 9-12
- Quantum Factor: 3.5-4.0
- RSI Smoothing: 3-5
- Threshold: 8-10
For Swing Trading (1H-4H timeframes):
Momentum Engine: MACD
- Fast Length: 12
- Slow Length: 26
- Signal Smoothing: 9
- MA Type: EMA
For Position Trading (Daily):
Momentum Engine: Moving Average
- Average Type: EMA or HMA
- Length: 20-50
📈 How to Use for Trading
Add to Chart:
Add indicator to your chart
Set your starting capital
Choose your preferred momentum engine
Understanding Signals:
Green circles: Strong bullish momentum reversal
Red circles: Strong bearish momentum reversal
Purple circles: Normal momentum reversal
Entry labels: Show exact entry points with tooltips
Trading Rules:
Enter LONG when you see an up arrow + green/purple circle
Enter SHORT when you see a down arrow + red/purple circle
Stop loss is automatically at the ZigZag level
Hold until next ZigZag appears (exit + reverse)
Risk Management:
Risk per trade = Entry Price - Stop Loss
Position size = (Capital * Risk %) / Risk per trade
Recommended risk: 1-2% per trade
💡 Best Practices
Market Conditions:
Works best in trending markets
Excellent for volatile pairs (crypto, forex majors)
Avoid during low volume/consolidation
Timeframe Selection:
Lower timeframes (5m-15m): More signals, higher noise
Higher timeframes (1H+): Fewer signals, higher reliability
Sweet spot: 15m-1H for most traders
Momentum Engine Selection:
Quantum: Best for volatile markets (crypto, indices)
MACD: Best for trending markets (forex, stocks)
Moving Average: Best for smooth trends (commodities)
📊 Dashboard Interpretation
The trading dashboard shows:
Current Capital: Your running balance
Position: Current trade direction
Entry/Stop: Your risk levels
Statistics: Win rate and performance
ROI: Overall return on investment
⚠️ Important Notes
Always Active: This system is always in a position (long or short)
No Neutral: You're either long or short, never flat
Automatic Reversal: Positions flip at each signal
Stop Loss: Fixed at entry ZigZag level (doesn't trail)
🎮 Quick Start Guide
Beginners: Start with default settings on 1H timeframe
Test First: Use paper trading to understand the signals
Small Size: Begin with 1% risk per trade
Track Results: Monitor the dashboard statistics
Adjust: Fine-tune momentum settings based on results
🔧 Customization Tips
Color Signals: Enable to see momentum strength
Dashboard Position: Move to preferred screen location
Visual Settings: Adjust colors for your theme
Alerts: Set up for automated notifications
This indicator is ideal for traders who prefer an always-in-market approach with clear entry/exit rules and automated position management. The key to success is choosing the right momentum engine for your market and maintaining disciplined risk management.
Zig-zag Sewing MachineIndicator Description: "Zig-zag Sewing Machine" 🧵
This indicator was created in honor of tailors and seamstresses, inspired by the zig-zag sewing machine. Just like the sewing machine needle stitches fabric back and forth, our “Zig-zag Sewing Machine” indicator visually stitches the chart by connecting the highs and lows of candles with lines that go up and down, forming a zig-zag pattern that makes it easier to see price pivots.
How it works:
The indicator identifies high and low pivots in the price, connecting them with colored lines — blue for upward trends and orange for downward trends — as if sewing points one by one, revealing the market’s up and down movements.
How to use:
The main parameter is the "Zigzag Length", which determines the sensitivity of the pivots.
When set to smaller values (for example, 1), the indicator is less sensitive, ideal for daily, weekly, and monthly charts, which are longer and slower timeframes. In this case, it filters noise better and shows more consistent moves.
On intraday charts, such as hourly, the recommended default value is 5, which captures pivots adequately for faster movements. Depending on the asset — especially cryptocurrencies, which have varied behaviors — this number can be adjusted up or down.
Remember: the smaller the number, the faster and more sensitive the indicator is, capturing smaller and more frequent oscillations; the larger the number, the slower and more filtered it is, suitable for broader and more stable movements.
Tips for use:
Use the indicator to identify reversal points and trend confirmations by observing how the zig-zag lines “sew” the chart.
Combine with other indicators to increase the reliability of entries and exits.
Adjust the length parameter according to the volatility and timeframe of the asset you trade.
Rights Notice
This indicator is an original work by Canhoto-Medium and is protected to prevent plagiarism and unauthorized copying. However, its use is free for the entire TradingView community.
DualWave Trend Signal [Auto1491]📘 English Description
DualWave Trend Signal is a trend-following indicator based on dual-layer dynamic price zones.
It computes two independent high/low ranges:
Outer Range (Z): a longer-term view of market extremes
Inner Range (Z1): a shorter-term perspective to refine entry/exit signals
The indicator dynamically adjusts two trend lines, then determines whether the price action confirms a bullish, bearish, or neutral trend. BUY and SELL signals are visualized on the chart, and bar colors reflect trend direction for quick reference.
✅ Features:
Dual-band price range logic for trend detection
Dynamic trend line adjustment based on historical highs/lows
Visual buy/sell signals at key inflection points
Color-coded bars: green (bullish), red (bearish), unchanged (neutral)
Real-time label showing the current market condition
🎯 How to Use:
Bullish when close > outer trend AND inner trend
Bearish when close < outer trend AND inner trend
Neutral otherwise
Entry signals appear on the first bar confirming a trend change
Suitable for intraday traders and scalpers in high-volatility markets like gold, forex, and indices.
📙 中文說明
DualWave Trend Signal 是一款基於雙重區間邏輯的趨勢判斷指標,透過動態高低區間辨識市場多空狀態。
本指標計算兩組不同比例的區間:
外層區間(Z):長期波動參考,捕捉趨勢主幹
內層區間(Z1):短期變化參考,用於精準進出點
當價格突破這兩條趨勢線,即顯示「多頭」或「空頭」訊號,並將K棒上色,方便用戶快速判斷目前市場狀態。
✅ 特點:
採用雙趨勢帶邏輯(內層+外層)
根據高低價動態調整趨勢線
明確的買賣訊號圖示
自動變色K棒:綠(多)、紅(空)、不變(盤整)
圖表右上實時顯示「目前趨勢狀態」
🎯 使用方式:
多頭:當收盤價 > 內層與外層趨勢線
空頭:當收盤價 < 內層與外層趨勢線
盤整:未同時突破上述趨勢線
當趨勢轉變時會出現首次進場訊號
適用於黃金、外匯、指數等高波動性市場的日內交易者。
[CUSTOM] Valid Pullbacks with pendingTrendFollow the approach of Valid Pullback & Trend indicator, but I have customized to have a pending line waiting for confirmation of the root source code
Draws the pending line to the developing internal high/low
Once a new pivot is confirmed:
- The pendingTrend line is cleared
- The direction is remembered
- No additional blue lines are drawn until the next internal pivot forms in the opposite direction
ZigZag ProZigZag Pro is a precise market structure indicator that automatically detects two independent ZigZag patterns and highlights breakouts whenever significant highs or lows are breached.
The indicator calculates two separate ZigZag structures in real time. ZigZag1 captures the broader market swings and is ideal for trend or swing trading. ZigZag2 is optional and reacts more quickly – perfect for intraday or scalping setups. Both layers are fully customizable in terms of depth, color, and line width.
What makes this tool especially useful: whenever a previous swing high (for long trades) or swing low (for short trades) is broken, the indicator draws a horizontal breakout line on the chart. This makes it easy to spot structural breakouts and take advantage of potential momentum moves.
ZigZag Pro is designed for traders who rely on clean, rule-based market structure — whether you're trading classic breakouts, smart money concepts, or simply want a clearer view of trend shifts. The visuals are minimal, responsive, and suitable for any timeframe.
Bullish Volume AnomalyAnomaly is designed to spot hidden bullish accumulation before price actually breaks out, by blending a trend-aware volume measure with a volatility-adjusted price channel. Here’s how it works:
First, it runs a simple ATR-based zigzag to identify the current swing direction. Volume is then signed (+ for up-trends, – for down-trends) and cumulatively summed. By converting that cumulative signed volume into a z-score over the past 480 bars, we get a sense of when buying or selling pressure is unusually strong relative to its own history.
At the same time, price itself is normalized into a z-score over the same 480-bar window, and its change over that period is also tracked. These two measures—volume z-score (s) and price z-score (p)—are compared, and the indicator looks for moments when s outpaces p by at least two standard deviations (s – p > 2), while price momentum change remains low (c < 1) and the net volume is positive (s > 0). That combination flags instances where heavy buying is taking place but price hasn’t yet reacted.
To define a dynamic trading zone, it plots a 288-bar EMA of price as the middle band (t2), and builds upper and lower bands around it using the average close-to-open range multiplied by a user-set factor. The lower band (t1) sits beneath the EMA by that volatility-based margin. A signal fires only when the bar’s high stays below t1—meaning price is still “sleeping” under the lower volatility boundary even as bullish volume builds up.
Together, these filters home in on anomalies: strong, trend-aligned volume surges that outstrip price movement, occurring while price sits below its lower volatility band. In practice, that often marks early accumulation before a breakout. You can tweak the ATR length and multiplier for the zigzag, as well as the channel period and range factor, to suit different markets or timeframes.
MÈGAS ALGO : ZIG-ZAG CYCLE INSIGTH [INDICATOR]Overview
The Zig-Zag Cycle Insigth is a revisited version of the classic Zig Zag indicator, designed to provide traders with a more comprehensive and actionable view of price movements.
This advanced tool not only highlights significant price swings but also incorporates additional features such as cycle analysis, real-time data tracking, and Fibonacci retracement levels. These enhancements make it an invaluable resource for identifying trends, potential reversal points, and market structure.
This indicator adheres to TradingView's guidelines and is optimized for both technical analysts and active traders who seek deeper insights into market dynamics.
Key Features:
1. Customizable Thresholds for Price Movements:
- Users can set personalized thresholds for price movement percentages and time periods.
This ensures that only significant price swings are plotted, reducing noise and increasing
clarity.
- Straight lines connect swing highs and lows, providing a cleaner visual representation of
the trend.
2. Cycle Analysis Table:
- A dynamic table is included to analyze price cycles based on three key factors:
- Price Change: Measures the magnitude of each swing (high-to-low or low-to-high).
- Time Duration (Bar Count): Tracks the number of bars elapsed between consecutive swings,
offering precise timing insights.
- Volume: Analyzes trading volume during each segment of the cycle.
- The indicator calculates the **maximum**, **minimum**, and **mean** values for each
parameter across all completed cycles, providing deeper statistical insights into market
behavior.
- This table updates in real-time, offering traders a quantitative understanding of how price
behaves over different cycles.
3. Real-Time Data Integration:
- The indicator displays live updates of current price action relative to the last identified
swing high/low. This includes:
- Current distance from the last pivot point.
- Percentage change since the last pivot.
- Volume traded since the last pivot.
4. Fibonacci Retracement Levels:
- Integrated Fibonacci retracement levels are dynamically calculated based on the most
recent significant swing high and low.
- Key retracement levels (23.6%, 38.2%, 50%, 61.8%, and 78.6%) are plotted alongside the Zig
Zag lines, helping traders identify potential support/resistance zones.
- Extension levels (100%, 161.8%, etc.) are also included to anticipate possible breakout
targets.
5. Customizable Alerts:
- Users can configure alerts for specific real-time conditions, such as:
- Price Change
- Duration
- Volume
- Fibonacci Retracement Levels
How It Works:
1. Zig Zag Identification:
- The indicator scans historical price data to identify significant turning points where the
price moves by at least the user-defined percentage threshold.
- These turning points are connected by straight lines to form the Zig Zag pattern.
2. Cycle Analysis:
For each completed cycle (from one swing high/low to the next), the indicator calculates:
- Price Change: Difference between the start and end prices of the cycle.
- Maximum Price Change: The largest price difference observed across all cycles.
- Minimum Price Change: The smallest price difference observed across all cycles.
- Mean Price Change: The average price difference across all cycles.
- Time Duration (Bar Count): Number of bars elapsed between consecutive swings.
- Maximum Duration: The longest cycle in terms of bar count.
- Minimum Duration: The shortest cycle in terms of bar count.
- Mean Duration: The average cycle length in terms of bar count.
- Volume: Total volume traded during the cycle.
- Maximum Volume: The highest volume traded during any single cycle.
- Minimum Volume: The lowest volume traded during any single cycle.
- Mean Volume: The average volume traded across all cycles.
- These calculations provide traders with a statistical overview of market behavior, enabling
them to identify patterns and anomalies in price, time, and volume.
3. Fibonacci Integration:
- Once a new swing high or low is identified, the indicator automatically calculates Fibonacci
retracement and extension levels.
- These levels serve as reference points for potential entry/exit opportunities.
4. Real-Time Updates:
- As the market evolves, the indicator continuously monitors the relationship between the
current price and the last identified swing point.
- Real-time metrics, such as percentage change and volume, are updated dynamically.
5. Alerts Based on Real-Time Parameters:
- The indicator allows users to set customizable alerts based on real-time conditions:
- Price Change Alert: Triggered when the real-time price change is less or greater than a
predefined percentage threshold (e.g., > or < fixed value).
- Duration Alert: Triggered when the cycle duration (in bars) is less or greater than a
predefined
bar count threshold (e.g., > or < fixed value).
- Volume Alert: Triggered when the trading volume during the current cycle is less or greater
than a predefined volume threshold (e.g., > or < fixed value).
Advantages of Zig-Zag Cycle Insigth
- Comprehensive Insights: Combining cycle analysis, Fibonacci retracements, and real-time data
provides a holistic view of market conditions.
- Statistical Analysis: The inclusion of maximum, minimum, and mean values for price change,
duration, and volume offers deeper insights into market behavior.
- Actionable Signals: Customizable alerts ensure traders never miss critical market events based
on real-time price, duration, and volume parameters.
- User-Friendly Design: Clear visuals and intuitive controls make it accessible for traders of all
skill levels.
Reference:
TradingView/ZigZag
TradingView/AutofibRetracement
Please Note:
This indicator is provided for informational and educational purposes only. It is not financial advice, and it should not be considered a recommendation to buy, sell, or trade any financial instrument. Trading involves significant risks, including the potential loss of your entire investment. Always conduct your own research and consult with a licensed financial advisor before making any trading decisions.
The results and images provided are based on algorithms and historical/paid real-time market data but do not guarantee future results or accuracy. Use this tool at your own risk, and understand that past performance is not indicative of future outcomes.
Zig Zag Trend Metrics“ Zig Zag Trend Metrics ” is a highly versatile indicator, built on the classic Zig Zag concept and thoughtfully designed for technical traders seeking a deeper, more structured view of market dynamics. This tool identifies significant swing highs and lows, classifies them, and annotates each with key metrics, offering a precise snapshot of each movement. It enhances visual analysis by drawing connecting lines that outline the flow of market structure, making trend progression and reversals instantly recognizable. Beyond visual mapping, it features a compact, real-time statistics table that calculates the average price and time deltas for both bullish and bearish swings, giving traders deep insights into trend momentum and rhythm. With extensive customization options, this indicator adapts seamlessly to vast trading styles or chart setups, empowering traders to spot patterns, evaluate trend strength, and make more confident, data-backed decisions.
❖ FEATURES
✦ Automatic Swing Detection
At its core, this indicator automatically identifies swing highs and lows based on a customizable lookback period (default: 10 bars).
✦ Labeling Swing Points
Each swing is visualized with a label that includes:
Swing Classification : “HH” (Higher High), “LH” (Lower High), “LL” (Lower Low), or “HL” (Higher Low).
Price Difference : Displayed in percentage or absolute value from the previous opposite swing.
Time Difference : The number of bars since the previous swing of the opposite type.
These labels offer traders clear, immediate insight into price movements and structural changes.
✦ Visual Lines
The indicator draws three types of lines:
Bullish Lines: Connect recent swing lows to new swing highs, indicating uptrends.
Bearish Lines: Connect recent swing highs to new swing lows, indicating downtrends.
Range Lines: Connect consecutive highs or lows to outline price channels.
Each line type can be color-coded and customized for visibility.
✦ Statistics Table
An on-screen metrics table provides a live summary of trends. Script uses Relative Averaging to smooth price and time changes. This prevents outliers from distorting the data and provides a more reliable sense of typical swing behavior.
Uptrend Metrics: Shows average price and time differences from recent bullish swings.
Downtrend Metrics: Shows the same for bearish swings.
🛠️ Customization Options
Ability to tailor the indicator to suit their strategy and aesthetic preferences:
Swing Period: Adjust sensitivity to short- or long-term swings.
Color Settings: Customize line and label colors.
Label Display: Choose between absolute or percentage price differences.
Table Settings: Modify size, location, or visibility.
This makes the indicator highly flexible and useful across various timeframes and assets.
Rev & Line - CoffeeKillerRev & Line - CoffeeKiller Indicator Guide
🔔 Warning: This Indicator Repaints 🔔 This indicator uses real-time calculations that may change based on future price action. As a result, signals (such as arrows, lines, or color changes) **can and will repaint** — meaning they may appear, disappear, or shift after a candle closes.
**Do not rely on this tool alone for live trading decisions.** Use with caution and always confirm with non-repainting tools or additional analysis.(This indicator is designed to show me the full length of the trend and because of this there can be a smaller movement inside of the trend movement)
Welcome traders! This guide will walk you through the Rev & Line indicator, a sophisticated technical analysis tool developed by CoffeeKiller that combines multiple methodologies to identify market pivots, trends, and potential reversal points.
Core Components
1. ZigZag Analysis
- Dynamic pivot detection using ATR (Average True Range)
- Customizable sensitivity through ATR Reversal Factor
- Color-coded trend lines (green for upward, red for downward)
- Optional vertical lines at pivot points
- Real-time pivot point analysis
2. Donchian Channel Integration
- Traditional upper, lower, and middle bands
- Customizable length and displacement
- Channel-based entry signals
- Dynamic market structure visualization
3. Marker Lines System
- Dynamic support/resistance level tracking
- Pivot-based reset mechanism
- Optional fill zones between markers
- Percentage position tracking within range
4. Signal Generation System
- Confluence between ZigZag pivots and Donchian channels
- Up/down arrow visualization
- Alert system
Main Features
ZigZag Settings
- ATR Reversal Factor: Controls pivot sensitivity (default 3.2)
- Customizable line appearance:
Width control (default: 3)
Color selection (green for uptrend, red for downtrend)
Vertical line options at pivot points
Maximum vertical lines display limit
- Hide repainted option for more reliable signals
Donchian Channel Configuration
- Optional channel visibility toggle
- Length parameter for lookback period (default: 20)
- Displace option for time offset
- Bubble offset for visual placement
Marker Lines System
- High/low/middle marker lines with step-line visualization
- Dotted line projections for future reference
- Pivot-based reset mechanism
- Color-coded percentage position display
Signal Generation
- Triangle markers for signals
- Combined ZigZag and Donchian confluence
- Alert system for notifications
Visual Elements
1. Pivot Lines
- Green: Upward price movements
- Red: Downward price movements
- Customizable line width
- Optional vertical pivot markers with style options:
Solid lines for confirmed pivots
Dashed lines for older pivots
Dotted lines for most recent pivots
2. Donchian Channels
- Upper band (red): Resistance level
- Lower band (green): Support level
- Middle band (yellow): Median price line
- Customizable display options
3. Marker Lines
- High marker line (magenta): Tracks highest open price
- Low marker line (cyan): Tracks lowest open price
- Middle marker line (blue): 50% level between high/low
- Dotted line extensions for future price projections
4. Position Tracking
- Percentage position display within marker range
- Real-time calculations from 0% to 100%
- Label system for visual reference
Trading Applications
1. Trend Following
- Enter on confirmed ZigZag pivot points
- Use Donchian channel boundaries as targets
- Trail stops using marker lines
- Monitor for confluence between systems
2. Counter-Trend Trading
- Trade bounces from marker lines
- Use pivot confirmation for entry timing
- Set stops based on recent pivot points
- Target the opposite marker line
3. Range Trading
- Use high/low marker lines to define range
- Trade bounces between upper and lower markers
- Consider middle marker for range midpoint
- Monitor percentage position within range
4. Breakout Trading
- Enter on breaks above/below marker lines
- Confirm with Donchian channel breakouts
- Use ZigZag pivot confirmations
- Wait for arrow signals for additional confirmation
Optimization Guide
1. ZigZag Parameters
- Higher ATR Factor: Less sensitive, major moves only
- Lower ATR Factor: More sensitive, catches minor moves
- Adjust line width for chart visibility
- Balance vertical line count for clarity
2. Donchian Channel Settings
- Longer length: Smoother channels, fewer false signals
- Shorter length: More responsive, but potentially noisier
- Displacement: Offset for historical reference
- Consider timeframe when setting parameters
3. Marker Line Configuration
- Enable/disable based on trading style
- Toggle middle line for additional reference
- Adjust colors for visual clarity
- Enable/disable labels as needed
4. Signal Generation
- Use "Hide repainted" option for more reliable signals
- Combine ZigZag and Donchian signals for confirmation
- Set alerts based on confirmed pivot points
- Balance sensitivity with reliability
Best Practices
1. Signal Confirmation
- Wait for confirmed pivot points
- Check for Donchian channel interactions
- Confirm with price action
- Look for arrow signals at pivot points
2. Risk Management
- Use recent pivot points for stop placement
- Consider marker line boundaries for targets
- Don't trade against strong trends
- Wait for clear confluence between systems
3. Setup Optimization
- Start with default settings
- Adjust based on timeframe
- Fine-tune ATR sensitivity
- Match settings to trading style
Advanced Features
1. Alert System
- Customizable arrow alerts
- Pivot point notifications
- Text message alerts with ticker information
- Once-per-bar frequency option
2. Pivot Detection Logic
The indicator uses a sophisticated state-based approach to detect pivots:
- State transitions between "uptrend," "downtrend," and "undefined"
- ATR-based reversal detection
- Minimum movement threshold for pivot confirmation
- Historical pivot tracking and labeling
3. Marker Line Reset Mechanism
- Marker lines reset based on pivot detection
- Dynamic support/resistance level adjustment
- Percentage position calculation within range
- Automatic updates as market structure changes
Remember:
- Combine multiple confirmation signals
- Use appropriate timeframe settings
- Monitor both ZigZag and Marker signals
- Pay attention to Donchian channel interactions
- Consider market volatility when trading
This indicator works best when:
- Used with proper risk management
- Combined with other technical tools
- Applied to appropriate timeframes
- Signals are confirmed by price action
**DISCLAIMER**: This indicator and its signals are intended solely for educational and informational purposes. They do not constitute financial advice. Trading involves significant risk of loss. Always conduct your own analysis and consult with financial professionals before making trading decisions.
Fibonacci - DolphinTradeBot
OVERVIEW
The 'Fibonacci - DolphinTradeBot' indicator is a Pine Script-based tool for TradingView that dynamically identifies key Fibonacci retracement levels using ZigZag price movements. It aims to replicate the Fibonacci Retracement tool available in TradingView’s drawing tools. The indicator calculates Fibonacci levels based on directional price changes, marking critical retracement zones such as 0, 0.236, 0.382, 0.5, 0.618, 0.786, and 1.0 on the chart. These levels are visualized with lines and labels, providing traders with precise areas of potential price reversals or trend continuation.
HOW IT WORKS ?
The indicator follows a zigzag formation. After a large swing movement, when new swings are formed without breaking the upper and lower levels, it places Fibonacci levels at the beginning and end points of the major swing movement."
▪️(Bullish) Structure :High → HigherLow → LowerHigh
▪️(Bearish) Structure :Low → LowerHigh → HigherLow
▪️When Fibonacci retracement levels are determined, a "📌" mark appears on the chart.
▪️If the price closes outside of these levels, a "❌" mark will appear.
USAGE
This indicator is designed to plot Fibonacci levels within an accumulation zone following significant price movements, helping you identify potential support and resistance. You can adjust the pivot periods to customize the zigzag settings to your preference. While classic Fibonacci levels are used by default, you also have the option to input custom levels and assign your preferred colors.
Set the Fibonacci direction option to "upward" to detect only bullish structures, "downward" to detect only bearish structures, and "both" to see both at the same time.
"To view past levels, simply enable the ' Show Previous Levels ' option, and to display the zigzag lines, activate the ' Show Zigzag ' setting."
ALERTS
The indicator, by default, triggers an alarm when both a level is formed and when a level is broken. However, if you'd like, you can select the desired level from the " Select Level " section in the indicator settings and set the alarm based on one of the conditions below.
▪️ cross-up → If the price breaks the Fibonacci level to the upside.
▪️ cross-down → If the price breaks the Fibonacci level to the downside.
▪️ cross-any → If the price breaks the Fibonacci level in any direction.
Segment RegressionAs an example of the descriptive power of Pine Script, this very short example traces a 'segment regression', a result not entirely obvious with so few lines of code, repositioning them when the previous inference moves away from the graph beyond the pre-set limit.
A trick used is to restart the new inference segment
- from the maximum reached in the previous trend, when positive (slope>0)
- from the minimum reached in the previous trend, when negative (slope<0)
The result can in my opinion be easily used to build strategies.
Triad Trade MatrixOverview
Triad Trade Matrix is an advanced multi-strategy indicator built using Pine Script v5. It is designed to simultaneously track and display key trading metrics for three distinct trading styles on a single chart:
Swing Trading (Swing Supreme):
This mode captures longer-term trends and is designed for trades that typically span several days. It uses customizable depth and deviation parameters to determine swing signals.
Day Trading (Day Blaze):
This mode focuses on intraday price movements. It generates signals that are intended to be executed within a single trading session. The parameters for depth and deviation are tuned to capture more frequent, shorter-term moves.
Scalping (Scalp Surge):
This mode is designed for very short-term trades where quick entries and exits are key. It uses more sensitive parameters to detect rapid price movements suitable for scalping strategies.
Each trading style is represented by its own merged table that displays real-time metrics. The tables update automatically as new trading signals are generated.
Key Features
Multi-Style Tracking:
Swing Supreme (Large): For swing trading; uses a purple theme.
Day Blaze (Medium): For day trading; uses an orange theme.
Scalp Surge (Small): For scalping; uses a green theme.
Real-Time Metrics:
Each table displays key trade metrics including:
Entry Price: The price at which the trade was entered.
Exit Price: The price at which the previous trade was exited.
Position Size: Calculated as the account size divided by the entry price.
Direction: Indicates whether the trade is “Up” (long) or “Down” (short).
Time: The time when the trade was executed (formatted to hours and minutes).
Wins/Losses: The cumulative number of winning and losing trades.
Current Price & PnL: The current price on the chart and the profit/loss computed relative to the entry price.
Duration: The number of bars that the trade has been open.
History Column: A merged summary column that shows the most recent trade’s details (entry, exit, and result).
Customizability:
Column Visibility: Users can toggle individual columns (Ticker, Timeframe, Entry, Exit, etc.) on or off according to their preference.
Appearance Settings: You can customize the table border width, frame color, header background, and text colors.
History Toggle: The merged history column can be enabled or disabled.
Chart Markers: There is an option to show or hide chart markers (labels and lines) that indicate trade entries and exits on the chart.
Trade History Management:
The indicator maintains a rolling history (up to three recent trades per trading style) and displays the latest summary in the merged table.
This history column provides a quick reference to recent performance.
How It Works
Signal Generation & Trade Metrics
Trade Entry/Exit Calculation:
For each trading style, the indicator uses built-in functions (such as ta.lowestbars and ta.highestbars) to analyze price movements. Based on a customizable "depth" and "deviation" parameter, it determines the point of entry for a trade.
Swing Supreme: Uses larger depth/deviation values to capture swing trends.
Day Blaze: Uses intermediate values for intraday moves.
Scalp Surge: Uses tighter parameters to pick up rapid price changes.
Metrics Update:
When a new trade signal is generated (i.e., when the trade entry price is updated), the indicator calculates:
The current PnL as the difference between the current price and the entry price (or vice versa, depending on the trade direction).
The duration as the number of bars since the trade was opened.
The position size using the formula: accountSize / entryPrice.
History Recording:
Each time a new trade is triggered (i.e., when the entry price is updated), a summary string is created (showing entry, exit, and win/loss status) and appended to the corresponding trade history array. The merged table then displays the latest summary from this history.
Table Display
Merged Table Structure:
Each trading style (Swing Supreme, Day Blaze, and Scalp Surge) is represented by a table that has 15 columns. The columns are:
Trade Type (e.g., Swing Supreme)
Ticker
Timeframe
Entry Price
Exit Price
Position Size
Direction
Time of Entry
Account Size
Wins
Losses
Current Price
Current PnL
Duration (in bars)
History (the latest trade summary)
User Customization:
Through the settings panel, users can choose which columns to display.
If a column is toggled off, its cells will remain blank, allowing traders to focus on the metrics that matter most to them.
Appearance & Themes:
The table headers and cell backgrounds are customizable via color inputs. The trading style names are color-coded:
Swing Supreme (Large): Uses a purple theme.
Day Blaze (Medium): Uses an orange theme.
Scalp Surge (Small): Uses a green theme.
How to Use the Indicator
Add the Indicator to Your Chart:
Once published, add "Triad Trade Matrix" to your TradingView chart.
Configure the Settings:
Adjust the Account Size to match your trading capital.
Use the Depth and Deviation inputs for each trading style to fine-tune the signal sensitivity.
Toggle the Chart Markers on if you want visual entry/exit markers on the chart.
Customize which columns are visible via the column visibility toggles.
Enable or disable the History Column to show the merged trade history in the table.
Adjust the appearance settings (colors, border width, etc.) to suit your chart background and preferences.
Interpret the Tables:
Swing Supreme:
This table shows metrics for swing trades.
Look for changes in entry price, PnL, and trade duration to monitor longer-term moves.
Day Blaze:
This table tracks day trading activity.It will update more frequently, reflecting intraday trends.
Scalp Surge:
This table is dedicated to scalping signals.Use it to see quick entry/exit data and rapid profit/loss changes.
The History column (if enabled) gives you a snapshot of the most recent trade (e.g., "E:123.45 X:124.00 Up Win").
Use allerts:
The indicator includes alert condition for new trade entries(both long and short)for each trading style.
Summary:
Triad Trade Matrix provides an robust,multi-dimensional view of your trading performance across swing trading, day trading, and scalping.
Best to be used whith my other indicators
True low high
Vma Ext_Adv_CustomTbl
This indicator is ideal for traders who wish to monitor multiple trading styles simultaneously, with a clear, technical, and real-time display of performance metrics.
Happy Trading!
Market Structure HH, HL, LH and LLMarket Structure Indicator (HH, HL, LH, LL) – Explanation and Usage
Overview:
This indicator is designed to detect and visualize market structure shifts by identifying Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL). It plots a ZigZag structure to mark trend changes, helping traders analyze price swings and market direction.
Indicator Logic:
The indicator operates based on ZigZag swing points to define trend shifts and structure changes.
Identifying Market Swings:
It finds local highs and lows using the ZigZag Length (zigzag_len), which defines how many bars back to check for a new swing high/low.
If the current high is the highest over zigzag_len periods, it marks it as a swing high.
If the current low is the lowest over zigzag_len periods, it marks it as a swing low.
Determining Market Structure:
Uptrend: Higher Highs (HH) & Higher Lows (HL)
Downtrend: Lower Lows (LL) & Lower Highs (LH)
The script continuously tracks the last two highs (h0, h1) and last two lows (l0, l1) to classify the current market structure.
Visual Elements:
ZigZag Line (Optional): Connects major swing highs and lows for trend visualization.
Labels (HH, HL, LH, LL):
HH (Higher High) – Price is making new highs → Uptrend Continuation.
HL (Higher Low) – Price forms a higher bottom → Uptrend Confirmation.
LL (Lower Low) – Price is making new lows → Downtrend Continuation.
LH (Lower High) – Price forms a lower top → Downtrend Confirmation.
Breakout Confirmation with Fibonacci Factor (Optional)
The indicator includes an option to confirm breakouts using the fib_factor, which ensures price moves beyond a certain retracement level.
How to Use This Indicator in Trading:
1. Identifying Trends & Trend Reversals
Uptrend: Look for a sequence of HH and HL.
Downtrend: Look for a sequence of LL and LH.
Trend Reversal: If price transitions from HH-HL to LH-LL, it signals a shift from an uptrend to a downtrend (and vice versa).
2. Confirming Entry & Exit Points
Buy Entry (Long Position)
Enter after a Higher Low (HL) is confirmed in an uptrend.
Combine with support zones or moving averages for confirmation.
Sell Entry (Short Position)
Enter after a Lower High (LH) is confirmed in a downtrend.
Combine with resistance zones or moving averages for confirmation.
Exit Strategy
Exit long trades when price fails to make a HH and forms an LH instead.
Exit short trades when price fails to make a LL and forms an HL instead.
3. Spotting Breakouts & Order Blocks
The Fib Factor setting allows traders to filter false breakouts by confirming price movement beyond a retracement threshold.
Potential Order Blocks can be identified by looking at the last major swing point before a breakout.
Benefits of This Indicator for Traders
✅ Trend Identification: Helps traders quickly determine if the market is in an uptrend or downtrend.
✅ Clear Market Structure Labels: Easily visualizes Higher Highs, Higher Lows, Lower Highs, and Lower Lows.
✅ Avoids Noise: The ZigZag algorithm removes small fluctuations and focuses on significant market movements.
✅ Assists with Entry & Exit Decisions: Provides objective signals for trend continuation or reversals.
✅ Works in All Markets: Useful for stocks, forex, crypto, and futures trading.
Would you like me to add additional features like Order Blocks, Breakout Confirmation, or Alerts to improve this indicator? 🚀
PIP Algorithm
# **Script Overview (For Non-Coders)**
1. **Purpose**
- The script tries to capture the essential “shape” of price movement by selecting a limited number of “key points” (anchors) from the latest bars.
- After selecting these anchors, it draws straight lines between them, effectively simplifying the price chart into a smaller set of points without losing major swings.
2. **How It Works, Step by Step**
1. We look back a certain number of bars (e.g., 50).
2. We start by drawing a straight line from the **oldest** bar in that range to the **newest** bar—just two points.
3. Next, we find the bar whose price is *farthest away* from that straight line. That becomes a new anchor point.
4. We “snap” (pin) the line to go exactly through that new anchor. Then we re-draw (re-interpolate) the entire line from the first anchor to the last, in segments.
5. We repeat the process (adding more anchors) until we reach the desired number of points. Each time, we choose the biggest gap between our line and the actual price, then re-draw the entire shape.
6. Finally, we connect these anchors on the chart with red lines, visually simplifying the price curve.
3. **Why It’s Useful**
- It highlights the most *important* bends or swings in the price over the chosen window.
- Instead of plotting every single bar, it condenses the information down to the “key turning points.”
4. **Key Takeaway**
- You’ll see a small number of red line segments connecting the **most significant** points in the price data.
- This is especially helpful if you want a simplified view of recent price action without minor fluctuations.
## **Detailed Logic Explanation**
# **Script Breakdown (For Coders)**
//@version=5
indicator(title="PIP Algorithm", overlay=true)
// 1. Inputs
length = input.int(50, title="Lookback Length")
num_points = input.int(5, title="Number of PIP Points (≥ 3)")
// 2. Helper Functions
// ---------------------------------------------------------------------
// reInterpSubrange(...):
// Given two “anchor” indices in `linesArr`, linearly interpolate
// the array values in between so that the subrange forms a straight line
// from linesArr to linesArr .
reInterpSubrange(linesArr, segmentLeft, segmentRight) =>
float leftVal = array.get(linesArr, segmentLeft)
float rightVal = array.get(linesArr, segmentRight)
int segmentLen = segmentRight - segmentLeft
if segmentLen > 1
for i = segmentLeft + 1 to segmentRight - 1
float ratio = (i - segmentLeft) / segmentLen
float interpVal = leftVal + (rightVal - leftVal) * ratio
array.set(linesArr, i, interpVal)
// reInterpolateAllSegments(...):
// For the entire “linesArr,” re-interpolate each subrange between
// consecutive breakpoints in `lineBreaksArr`.
// This ensures the line is globally correct after each new anchor insertion.
reInterpolateAllSegments(linesArr, lineBreaksArr) =>
array.sort(lineBreaksArr, order.asc)
for i = 0 to array.size(lineBreaksArr) - 2
int leftEdge = array.get(lineBreaksArr, i)
int rightEdge = array.get(lineBreaksArr, i + 1)
reInterpSubrange(linesArr, leftEdge, rightEdge)
// getMaxDistanceIndex(...):
// Return the index (bar) that is farthest from the current “linesArr.”
// We skip any indices already in `lineBreaksArr`.
getMaxDistanceIndex(linesArr, closeArr, lineBreaksArr) =>
float maxDist = -1.0
int maxIdx = -1
int sizeData = array.size(linesArr)
for i = 1 to sizeData - 2
bool isBreak = false
for b = 0 to array.size(lineBreaksArr) - 1
if i == array.get(lineBreaksArr, b)
isBreak := true
break
if not isBreak
float dist = math.abs(array.get(linesArr, i) - array.get(closeArr, i))
if dist > maxDist
maxDist := dist
maxIdx := i
maxIdx
// snapAndReinterpolate(...):
// "Snap" a chosen index to its actual close price, then re-interpolate the entire line again.
snapAndReinterpolate(linesArr, closeArr, lineBreaksArr, idxToSnap) =>
if idxToSnap >= 0
float snapVal = array.get(closeArr, idxToSnap)
array.set(linesArr, idxToSnap, snapVal)
reInterpolateAllSegments(linesArr, lineBreaksArr)
// 3. Global Arrays and Flags
// ---------------------------------------------------------------------
// We store final data globally, then use them outside the barstate.islast scope to draw lines.
var float finalCloseData = array.new_float()
var float finalLines = array.new_float()
var int finalLineBreaks = array.new_int()
var bool didCompute = false
var line pipLines = array.new_line()
// 4. Main Logic (Runs Once at the End of the Current Bar)
// ---------------------------------------------------------------------
if barstate.islast
// A) Prepare closeData in forward order (index 0 = oldest bar, index length-1 = newest)
float closeData = array.new_float()
for i = 0 to length - 1
array.push(closeData, close )
// B) Initialize linesArr with a simple linear interpolation from the first to the last point
float linesArr = array.new_float()
float firstClose = array.get(closeData, 0)
float lastClose = array.get(closeData, length - 1)
for i = 0 to length - 1
float ratio = (length > 1) ? (i / float(length - 1)) : 0.0
float val = firstClose + (lastClose - firstClose) * ratio
array.push(linesArr, val)
// C) Initialize lineBreaks with two anchors: 0 (oldest) and length-1 (newest)
int lineBreaks = array.new_int()
array.push(lineBreaks, 0)
array.push(lineBreaks, length - 1)
// D) Iteratively insert new breakpoints, always re-interpolating globally
int iterationsNeeded = math.max(num_points - 2, 0)
for _iteration = 1 to iterationsNeeded
// 1) Re-interpolate entire shape, so it's globally up to date
reInterpolateAllSegments(linesArr, lineBreaks)
// 2) Find the bar with the largest vertical distance to this line
int maxDistIdx = getMaxDistanceIndex(linesArr, closeData, lineBreaks)
if maxDistIdx == -1
break
// 3) Insert that bar index into lineBreaks and snap it
array.push(lineBreaks, maxDistIdx)
array.sort(lineBreaks, order.asc)
snapAndReinterpolate(linesArr, closeData, lineBreaks, maxDistIdx)
// E) Save results into global arrays for line drawing outside barstate.islast
array.clear(finalCloseData)
array.clear(finalLines)
array.clear(finalLineBreaks)
for i = 0 to array.size(closeData) - 1
array.push(finalCloseData, array.get(closeData, i))
array.push(finalLines, array.get(linesArr, i))
for b = 0 to array.size(lineBreaks) - 1
array.push(finalLineBreaks, array.get(lineBreaks, b))
didCompute := true
// 5. Drawing the Lines in Global Scope
// ---------------------------------------------------------------------
// We cannot create lines inside barstate.islast, so we do it outside.
array.clear(pipLines)
if didCompute
// Connect each pair of anchors with red lines
if array.size(finalLineBreaks) > 1
for i = 0 to array.size(finalLineBreaks) - 2
int idxLeft = array.get(finalLineBreaks, i)
int idxRight = array.get(finalLineBreaks, i + 1)
float x1 = bar_index - (length - 1) + idxLeft
float x2 = bar_index - (length - 1) + idxRight
float y1 = array.get(finalCloseData, idxLeft)
float y2 = array.get(finalCloseData, idxRight)
line ln = line.new(x1, y1, x2, y2, extend=extend.none)
line.set_color(ln, color.red)
line.set_width(ln, 2)
array.push(pipLines, ln)
1. **Data Collection**
- We collect the **most recent** `length` bars in `closeData`. Index 0 is the oldest bar in that window, index `length-1` is the newest bar.
2. **Initial Straight Line**
- We create an array called `linesArr` that starts as a simple linear interpolation from `closeData ` (the oldest bar’s close) to `closeData ` (the newest bar’s close).
3. **Line Breaks**
- We store “anchor points” in `lineBreaks`, initially ` `. These are the start and end of our segment.
4. **Global Re-Interpolation**
- Each time we want to add a new anchor, we **re-draw** (linear interpolation) for *every* subrange ` [lineBreaks , lineBreaks ]`, ensuring we have a globally consistent line.
- This avoids the “local subrange only” approach, which can cause clustering near existing anchors.
5. **Finding the Largest Distance**
- After re-drawing, we compute the vertical distance for each bar `i` that isn’t already a line break. The bar with the biggest distance from the line is chosen as the next anchor (`maxDistIdx`).
6. **Snapping and Re-Interpolate**
- We “snap” that bar’s line value to the actual close, i.e. `linesArr = closeData `. Then we globally re-draw all segments again.
7. **Repeat**
- We repeat these insertions until we have the desired number of points (`num_points`).
8. **Drawing**
- Finally, we connect each consecutive pair of anchor points (`lineBreaks`) with a `line.new(...)` call, coloring them red.
- We offset the line’s `x` coordinate so that the anchor at index 0 lines up with `bar_index - (length - 1)`, and the anchor at index `length-1` lines up with `bar_index` (the current bar).
**Result**:
You get a simplified representation of the price with a small set of line segments capturing the largest “jumps” or swings. By re-drawing the entire line after each insertion, the anchors tend to distribute more *evenly* across the data, mitigating the issue where anchors bunch up near each other.
Enjoy experimenting with different `length` and `num_points` to see how the simplified lines change!
Dual Zigzag [Trendoscope®]🎲 Dual Zigzag indicator is built on recursive zigzag algorithm. It is very similar to other zigzag indicators published by us and other authors. However, the key point here is, the indicator draws zigzag on both price and any other plot based indicator on separate layouts.
Before we get into the indicator, here are some brief descriptions of the underlying concepts and key terminologies
🎯 Zigzag
Zigzag indicator breaks down price or any input series into a series of Pivot Highs and Pivot Lows alternating between each other. Zigzags though shows pivot high and lows, should not be used for buying at low and selling at high. The main application of zigzag indicator is for the visualisation of market structure and this can be used as basic building block for any pattern recognition algorithms.
🎯 Recursive Zigzag Algorithm
Recursive zigzag algorithm builds zigzag on multiple levels and each level of zigzag is based on the previous level pivots. The level zero zigzag is built on price. However, for level 1, instead of price level 0 zigzag pivots are used. Similarly for level 2, level 1 zigzag pivots are used as base.
🎲 Components Dual Zigzag Indicator
Here are the components of Dual zigzag indicator
Built in Oscillator - Indicator has built in oscillator options for plotting RSI (Relative Strength Index), MFI (Money Flow Index), cci (Commodity Channel Index) , CMO (Chande Momentum Oscillator), COG (Center of Gravity), and ROC (Rate of Change). Apart from the given built in oscillators, users can also use a custom external output as base. The oscillators are not printed on the price pane. But, printed on a separate indicator overlay.
Zigzag On Oscillator - Recursive zigzag is calculated and printed on the oscillator series. Each pivot high and pivot low also prints a label having the retracement ratios, and price levels at those points. Zigzag on the oscillator is also printed on the indicator overlay pane.
Zigzag on Price - Recursive zigzag calculated based on price and printed on the price pane. This is made possible by using force_overlay option present in the drawing objects. At each zigzag pivot levels, the label having price retracement ratios, and oscillator values are printed.
It is called dual zigzag because, the indicator calculates the zigzag on both price and oscillator series of values and prints them separately on different panes on the chart.
🎲 Indicator Settings
Settings include
Theme display settings to get the right colour combination to match the background.
Zigzag settings to be used for zigzag calculation and display
Oscillator settings to chose the oscillator to be used as base for 2nd zigzag
🎲 Applications
Useful in spotting divergences with both indicator and price having their own zigzag to highlight pivots
Spotting patterns in indicators/oscillators and correlate them with the patterns on price
🎲 Using External Input
If users want to use an external indicator such as OBV instead of the built in oscillators, then can do so by using the custom option.
Here is how this can be done.
Step1. Add both Dual Zigzag and the intended indicator (in this case OBV) on the chart. Notice that both OBV and Dual zigzag appear on different panes.
Step2. Edit the indicator settings of Dual zigzag and set custom indicator by selecting "custom" as oscillator name and then by setting the custom external indicator name and input.
Step 3. You would notice that the zigzag in Dual Zigzag indictor pane is already showing the zigzag pivots based on the OBV indicator and the price pivots display obv values at the pivot points. We can leave this as is.
Step 4. As an additional step, you can also merge the OBV pane and the Dual zigzag indicator pane into one by going into OBV settings and moving the indicator to above pane. Merge the scales so that there is no two scales on the same pane and the entire scale appear on the right.
At the end, you should see two panes - one with price and other with OBV and both having their zigzag plotted.
VD Zig Zag with SMAIntroduction
The VD Zig Zag with SMA indicator is a powerful tool designed to streamline technical analysis by combining Zig Zag swing lines with a Simple Moving Average (SMA). It offers traders a clear and intuitive way to analyze price trends, market structure, and potential reversals, all within a customizable framework.
Definition
The Zig Zag indicator is a trend-following tool that highlights significant price movements by filtering out smaller fluctuations. It visually connects swing highs and lows to reveal the underlying market structure. When paired with an SMA, it provides an additional layer of trend confirmation, helping traders align their strategies with market momentum.
Calculations
Zig Zag Logic:
Swing highs and lows are determined using a user-defined length parameter.
The highest and lowest points within the specified range are identified using the ta.highest() and ta.lowest() functions.
Zig Zag lines dynamically connect these swing points to visually map price movements.
SMA Logic:
The SMA is calculated using the closing prices over a user-defined period.
It smooths out price action to provide a clearer view of the prevailing trend.
The indicator allows traders to adjust the Zig Zag length and SMA period to suit their preferred trading timeframe and strategy.
Takeaways
Enhanced Trend Analysis: The Zig Zag lines clearly define the market's structural highs and lows, helping traders identify trends and reversals.
Customizable Parameters: Both the swing length and SMA period can be tailored for short-term or long-term trading strategies.
Visual Clarity: By filtering out noise, the indicator simplifies chart analysis and enables better decision-making.
Multi-Timeframe Support: Adapts seamlessly to the chart's timeframe, ensuring usability across all trading horizons.
Limitations
Lagging Nature: As with any indicator, the Zig Zag and SMA components are reactive and may lag during sudden price movements.
Sensitivity to Parameters: Improper parameter settings can lead to overfitting, where the indicator reacts too sensitively or misses significant trends.
Does Not Predict: This indicator identifies trends and structure but does not provide forward-looking predictions.
Summary
The VD Zig Zag with SMA indicator is a versatile and easy-to-use tool that combines the strengths of Zig Zag swing analysis and moving average trends. It helps traders filter market noise, visualize structural patterns, and confirm trends with greater confidence. While it comes with limitations inherent to all technical tools, its customizable features and multi-timeframe adaptability make it an excellent addition to any trader’s toolkit.
Additional Features
Have an idea or a feature you'd like to see added?
Feel free to reach out or share your suggestions here—I’m always open to updates!
Predict Trend [Cometreon]Predict Trend is a forward-looking indicator that compares the current market trend with historical patterns, providing statistically based forecasts. Using advanced algorithms, it continuously scans for price behaviors similar to those in the past and projects average outcomes based on those patterns.
This innovative approach offers traders a powerful tool to anticipate market movements, refine strategies, and make data-driven decisions.
🔷 Key Features
🟩 Historical Pattern Analysis:
The indicator identifies and compares the current trend with similar historical patterns, providing predictions based on concrete and historical data.
🟩 Customizable Precision:
Offers the ability to adjust various parameters such as distance and percentage variation between levels, improving the accuracy of pattern search.
🟩 Historical Average-Based Predictions:
Displays the predicted movement based on the average of all historical patterns found, allowing for informed trading decisions.
🟩 Specific Pattern Search:
In addition to automatic search based on the active trend, Predict allows searching for specific patterns by manually entering the necessary data for analysis.
🟩 Forecast Visualization:
Provides a detailed table with all values found and a line representing the average of results, offering a clear view of predictions based on historical data.
🔷 Technical Details and Customizable Inputs
1️⃣ Precision Parameters - Allows adjusting the length of levels, pattern precision, and the number of subsequent values to obtain after identifying historical patterns.
2️⃣ Specific Pattern Search - Allows manual data entry to search for specific patterns, offering greater flexibility in analysis.
3️⃣ Timeframe - Predict works on any timeframe, with greater precision on higher timeframes.
4️⃣ Chart Compatibility - It is compatible with all chart types, allowing analysis and comparison of historical patterns regardless of the chart type used.
5️⃣ Level 1 - First correlation level for patterns. "Last Bar to Check" allows choosing the number of Pivots to check for searching patterns in the past with the same values (e.g., HH, LL, LH, and HL).
6️⃣ Level 2 - Checks the candle distance between each level. "Error Value Up-Down" allows adding a margin value between distances.
7️⃣ Level 3 - Verifies the percentage distance between levels. "Error Percent" allows adding an error margin to the percentage distance.
8️⃣ Bar to Have - Determines how many values after each pattern to display in the table.
9️⃣ Timezone - Enter the chart's time zone to display the precise start time of the pattern.
🔟 Manual Search - Allows searching for specific patterns by manually entering up to 8 values, including special values such as:
High Value : "HH" (Higher High) or "LH" (Lower High)
Low Value : "LL" (Lower Low) or "HL" (Higher Low)
Top / Bottom : "HH" or "LL"
Mid Level : "LH" or "HL"
1️⃣1️⃣ Approximate Trend - Shows a trend based on the average of values for each pattern in each section. Allows customizing up to 4 colors, line thickness, and style.
1️⃣2️⃣ Pattern Table - Shows the values of identified patterns. You can customize the number of patterns to show, display order, position, size, and table style.
1️⃣3️⃣ Displayed Elements - Customize elements shown on the table, such as Number, Date, or subsequent Swing values.
1️⃣4️⃣ Style Label - Modify the visual appearance of labels by selecting colors for background and text.
These options allow optimizing the indicator for different trading styles and market conditions, ensuring accurate and customized technical analysis.
🔍 How to Use Predict Trend
📌 Past Movement Analysis
Use the patterns found to compare past movements with the current trend, gaining a clear vision of possible future directions.
📊 Using Value Averages
Analyze the average of values from found patterns to get a more direct and synthetic view of past market behavior.
🎯 Specific Pattern Search
In addition to automatic search based on the active trend, Predict allows searching for specific patterns by entering the necessary data for targeted analysis.
☄️ With Predict Trend , you can simplify your market analysis, saving time and improving the accuracy of your decisions with predictions based on concrete and verifiable historical data.
Don't waste any more time and take advantage of the precision of historical pattern analysis to gain a competitive edge in the market.