OPEN-SOURCE SCRIPT
Adaptive Square Levels (Prev + Curr Month, Big Labels)

Title:
🔢 Adaptive Square Levels — Monthly Precision Trendlines
Description:
The Adaptive Square Levels indicator dynamically plots mathematical square number levels based on the first trading day’s open of each month.
📌 Key Features:
Plots horizontal trendlines aligned with the nearest square number to the monthly open.
Automatically generates ±10 additional square levels above and below that anchor.
Shows current month and previous month levels only, keeping the chart clean.
Special highlight: levels that are squares of multiples of 3 (9, 36, 81…) appear in orange for easy recognition.
The nearest square line is bold and labeled with a ★ star, making it instantly stand out.
Labels use large fonts, ensuring values are clearly visible alongside price scale.
📊 How It Works:
At the first bar of each new month, the script locks the opening price.
It finds the nearest perfect square to that open.
The indicator then plots horizontal levels extending across the month (finite lines, not rays).
At month change, previous month levels are fixed and new levels start fresh.
⚡ Use Cases:
Identify natural mathematical zones of support/resistance.
Compare current vs. previous month’s adaptive levels.
Use as confluence with price action or other technical tools.
⚠️ Disclaimer:
This script is for educational and analytical purposes only. It is not financial advice. Trading involves risk, and past levels or patterns do not guarantee future performance. Always use with proper risk management.
🔢 Adaptive Square Levels — Monthly Precision Trendlines
Description:
The Adaptive Square Levels indicator dynamically plots mathematical square number levels based on the first trading day’s open of each month.
📌 Key Features:
Plots horizontal trendlines aligned with the nearest square number to the monthly open.
Automatically generates ±10 additional square levels above and below that anchor.
Shows current month and previous month levels only, keeping the chart clean.
Special highlight: levels that are squares of multiples of 3 (9, 36, 81…) appear in orange for easy recognition.
The nearest square line is bold and labeled with a ★ star, making it instantly stand out.
Labels use large fonts, ensuring values are clearly visible alongside price scale.
📊 How It Works:
At the first bar of each new month, the script locks the opening price.
It finds the nearest perfect square to that open.
The indicator then plots horizontal levels extending across the month (finite lines, not rays).
At month change, previous month levels are fixed and new levels start fresh.
⚡ Use Cases:
Identify natural mathematical zones of support/resistance.
Compare current vs. previous month’s adaptive levels.
Use as confluence with price action or other technical tools.
⚠️ Disclaimer:
This script is for educational and analytical purposes only. It is not financial advice. Trading involves risk, and past levels or patterns do not guarantee future performance. Always use with proper risk management.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。