OPEN-SOURCE SCRIPT
Updated Gurpreet Test Script

Market Cycle Analyzer is a custom TradingView indicator designed to analyze long-term market cycles using the 50-day and 200-day Simple Moving Averages. It identifies completed bull and bear cycles, measures maximum separation between the moving averages, tracks cycle duration, and calculates key statistics such as price change and bars since the last crossover. The indicator is designed to help visualize market structure and provide historical context for trend analysis rather than generate buy or sell signals.
Release Notes
Taking out a comment.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.
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.
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.