OPEN-SOURCE SCRIPT
已更新 Auto Center Chart

Automatically centers the chart within the current visible chart window.
This utility indicator scans the visible range to determine its High and Low, then adjusts autoscale so that the most recent completed candle remains visually centered — without drawing any visible objects or cluttering the chart.
Why This Is Useful:
- Prevents price from hugging the top or bottom of the screen
- Reduces visual bias during analysis
- Improves clarity when planning risk/reward
- Keeps the active candle visually balanced
- Eliminates constant manual scale adjustments
The script only influences scaling at the right edge and does not change when hovering over historical candles.
Important Notes:
- Requires Auto (fits data to screen) to be enabled in chart settings
- May not work as expected if other indicators are also forcing autoscale or adding extra chart space
- Designed for standard time-based charts
If another script modifies scaling or the chart is not in Auto mode, TradingView’s scaling engine can override this indicator.
This utility indicator scans the visible range to determine its High and Low, then adjusts autoscale so that the most recent completed candle remains visually centered — without drawing any visible objects or cluttering the chart.
Why This Is Useful:
- Prevents price from hugging the top or bottom of the screen
- Reduces visual bias during analysis
- Improves clarity when planning risk/reward
- Keeps the active candle visually balanced
- Eliminates constant manual scale adjustments
The script only influences scaling at the right edge and does not change when hovering over historical candles.
Important Notes:
- Requires Auto (fits data to screen) to be enabled in chart settings
- May not work as expected if other indicators are also forcing autoscale or adding extra chart space
- Designed for standard time-based charts
If another script modifies scaling or the chart is not in Auto mode, TradingView’s scaling engine can override this indicator.
發行說明
Update: Improved StabilityRefined the autoscale recalculation timing to reduce chart “jump” behavior when a new bar begins.
Auto-centering now updates more smoothly while maintaining the same functionality and visual balance.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。