OPEN-SOURCE SCRIPT
Updated ZigZag with Retracement Levels

This is a modification to "ZigZag with Fibonacci Levels" by LonesomeTheBlue. https://tradingview.sweetlogin.com/script/vCJe18K3-ZigZag-with-Fibonacci-Levels/
By default, the script finds the ZigZag, draws Fibonacci lines and labels accordinly. ZigZag period can be set.
The modification to the original script provides the following features:
1) Option for user to customize retracement levels, if they don't want to use Fibonacci levels. This allows for different strategy adoptions.
2) Option to show Fibonacci or custom retracement levels based on the latest pivot (including the current bar)
For example:

Enjoy and happy trading~!!
By default, the script finds the ZigZag, draws Fibonacci lines and labels accordinly. ZigZag period can be set.
The modification to the original script provides the following features:
1) Option for user to customize retracement levels, if they don't want to use Fibonacci levels. This allows for different strategy adoptions.
2) Option to show Fibonacci or custom retracement levels based on the latest pivot (including the current bar)
For example:
Enjoy and happy trading~!!
Release Notes
Fixed calculation error on current fib level 1 and level 5Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Purchases / Subscriptions / Support - buymeacoffee.com/ptgambler
PayPal - paypal.me/PtGambler
You can reach me privately through my Discord Channel: discord.gg/WMQfaVGyQC
PayPal - paypal.me/PtGambler
You can reach me privately through my Discord Channel: discord.gg/WMQfaVGyQC
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Purchases / Subscriptions / Support - buymeacoffee.com/ptgambler
PayPal - paypal.me/PtGambler
You can reach me privately through my Discord Channel: discord.gg/WMQfaVGyQC
PayPal - paypal.me/PtGambler
You can reach me privately through my Discord Channel: discord.gg/WMQfaVGyQC
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.