OPEN-SOURCE SCRIPT
天干地支标注(当前视窗范围 + 居中标签)

🇨🇳 中文说明
天干地支标注(自动匹配周期)
本指标会根据图表的时间周期(年、月、日、小时、分钟)自动计算并在每根 K 线上方显示对应的天干地支。
• 自动识别图表周期(年/月/日/时/分)
• 仅显示当前视窗内的柱子,性能高、不卡顿
• 可自定义每隔 N 根显示一次(默认每根)
• 支持居中矩形标签(label.style_label_center),清晰易读
• 无需区分暗黑/亮色主题,自动兼容所有图表样式
可作为金融时间序列与中国传统历法(干支纪时)结合的参考工具,
在时间周期研究、风水、气运周期、江恩时间分析等领域有辅助价值。
⸻
🇬🇧 English Description (for international visibility)
Heavenly Stems & Earthly Branches Marker (Auto-Adaptive Version)
This indicator automatically calculates and displays the corresponding Chinese Heavenly Stems and Earthly Branches (Ganzhi) for each candlestick, based on the chart’s timeframe (Year, Month, Day, Hour, or Minute).
• Auto-detects chart timeframe
• Draws only within the current visible window (optimized performance)
• Adjustable display interval (e.g., show every N bars)
• Uses centered label style for clarity
• Compatible with both dark and light themes
Useful for combining Chinese calendar cycles with financial time analysis, time-cycle studies, or Gann-style timing models.
天干地支标注(自动匹配周期)
本指标会根据图表的时间周期(年、月、日、小时、分钟)自动计算并在每根 K 线上方显示对应的天干地支。
• 自动识别图表周期(年/月/日/时/分)
• 仅显示当前视窗内的柱子,性能高、不卡顿
• 可自定义每隔 N 根显示一次(默认每根)
• 支持居中矩形标签(label.style_label_center),清晰易读
• 无需区分暗黑/亮色主题,自动兼容所有图表样式
可作为金融时间序列与中国传统历法(干支纪时)结合的参考工具,
在时间周期研究、风水、气运周期、江恩时间分析等领域有辅助价值。
⸻
🇬🇧 English Description (for international visibility)
Heavenly Stems & Earthly Branches Marker (Auto-Adaptive Version)
This indicator automatically calculates and displays the corresponding Chinese Heavenly Stems and Earthly Branches (Ganzhi) for each candlestick, based on the chart’s timeframe (Year, Month, Day, Hour, or Minute).
• Auto-detects chart timeframe
• Draws only within the current visible window (optimized performance)
• Adjustable display interval (e.g., show every N bars)
• Uses centered label style for clarity
• Compatible with both dark and light themes
Useful for combining Chinese calendar cycles with financial time analysis, time-cycle studies, or Gann-style timing models.
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。