OPEN-SOURCE SCRIPT
מעודכן

Percentage Based ZigZag

559
█ OVERVIEW

The Percentage-Based ZigZag indicator is a custom technical analysis tool designed to highlight significant price reversals while filtering out market noise. Unlike many standard zigzag tools that rely solely on fixed price moves or generic trend-following methods, this indicator uses a configurable percentage threshold to dynamically determine meaningful pivot points. This approach not only adapts to different market conditions but also helps traders distinguish between minor fluctuations and truly significant trend shifts—whether scalping on shorter timeframes or analyzing longer-term trends.

█ KEY FEATURES & ORIGINALITY

Dynamic Pivot Detection
The indicator identifies pivot points by measuring the percentage change from the previous extreme (high or low). Only when this change exceeds a user-defined threshold is a new pivot recognized. This method ensures that only substantial moves are considered, making the indicator robust in volatile or noisy markets.

Enhanced ZigZag Visualization
By connecting significant highs and lows with a continuous line, the indicator creates a clear visual map of price swings. Each pivot point is labelled with the corresponding price and the percentage change from the previous pivot, providing immediate quantitative insight into the magnitude of the move.

Trend Reversal Projections
In addition to marking completed reversals, the script computes and displays potential future reversal points based on the current trend’s momentum. This forecasting element gives traders an advanced look at possible turning points, which can be particularly useful for short-term scalping strategies.

Customizable Visual Settings
Users can tailor the appearance by:
 • Setting the percentage threshold to control sensitivity.
 • Customizing colors for bullish (e.g., green) and bearish (e.g., red) reversals.
 • Enabling optional background color changes that visually indicate the prevailing trend.

█ UNDERLYING METHODOLOGY & CALCULATIONS

Percentage-Based Filtering
The script continuously monitors price action and calculates the relative percentage change from the last identified pivot. A new pivot is confirmed only when the price moves a preset percentage away from this pivot, ensuring that minor fluctuations do not trigger false signals.

Pivot Point Logic
The indicator tracks the highest high and the lowest low since the last pivot. When the price reverses by the required percentage from these extremes, the algorithm:
 1 — Labels the point as a significant high or low.
 2 — Draws a connecting line from the previous pivot to the current one.
 3 — Resets the extreme-tracking for detecting the next move.

Real-Time Reversal Estimation
Building on traditional zigzag methods, the script incorporates a projection calculation. By analyzing the current trend’s strength and recent percentage moves, it estimates where a future reversal might occur, offering traders actionable foresight.

█ HOW TO USE THE INDICATOR

1 — Apply the Indicator
 • Add the Percentage-Based ZigZag indicator to your trading chart.

2 — Adjust Settings for Your Market
 • Percentage Move – Set a threshold that matches your trading style:
  - Lower values for sensitive, high-frequency analysis (ideal for scalping).
  - Higher values for filtering out noise on longer timeframes.
 • Visual Customization – Choose your preferred colors for bullish and bearish signals and enable background color changes for visual trend cues.
 • Reversal Projection – Enable or disable the projection feature to display potential upcoming reversal points.

3 — Interpret the Signals
 • ZigZag Lines – White lines trace significant high-to-low or low-to-high movements, visually connecting key swing points.
 • Pivot Labels – Each pivot is annotated with the exact price level and percentage change, providing quantitative insight into market momentum.
 • Trend Projections – When enabled, projected reversal levels offer insight into where the current trend might change.

4 — Integrate with Your Trading Strategy
 • Use the indicator to identify support and resistance zones derived from significant pivots.
 • Combine the quantitative data (percentage changes) with your risk management strategy to set optimal stop-loss and take-profit levels.
 • Experiment with different threshold settings to adapt the indicator for various instruments or market conditions.

█ CONCLUSION

The Percentage-Based ZigZag indicator goes beyond traditional trend-following tools by filtering out market noise and providing clear, quantifiable insights into price action. With its percentage threshold for pivot detection and real-time reversal projections, this original methodology and customizable feature set offer traders a versatile edge for making informed trading decisions.
הערות שחרור
New Features & Enhancements
  • Added toggles for showing ZigZag price and percentage change at reversal points.
  • Introduced font size selection and adjustable label offset for better readability.


Improvements
  • Reversal Information Label Placement: Now dynamically positioned using an adjustable offset.
  • Cleaner Label Text: Labels are built dynamically based on user settings.
  • Enhanced Input Organization: Renamed groups and added tooltips for clarity.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.