OPEN-SOURCE SCRIPT
Aggiornato

Golden Ratio Levels: Static Range Anchor

2 216
核心功能
本指标基于指定历史区间(可偏移)的最高点和最低点,在图表右侧绘制静态的黄金分割支撑/阻力位。所有数值仅在最后一根K线确定,永不重绘,信号稳定可靠。

特点与优势
  • ✅ 不重绘:只在图表最新K线计算一次,避免未来函数影响,适合交易决策。
  • ✅ 偏移周期:可跳过最近若干K线,剔除未完成K线或短期噪声,使区间更具代表性。
  • ✅ 视觉清晰:不同颜色和线型区分各分割位(23.6%、38.2%、50%、61.8%、80.9%),右侧标签显示百分比和精确价格。
  • ✅ 起点修正:垂直线和“起点”标签精确对齐计算区间的第一根K线,无视觉偏移。
  • ✅ 内存优化:自动清理旧图形,保持图表简洁。

参数说明
  • 统计周期:用于寻找高点和低点的K线数量。
  • 偏移周期:将计算窗口向后移动的K线数(从当前K线往前推)。
  • 显示比例标签:控制右侧百分比标签的显隐。

适用场景
  • 识别趋势中的回调支撑(上涨后回调至38.2%、50%、61.8%)
  • 判断反弹阻力(下跌后反弹至上述位置)
  • 结合K线形态、成交量或其他指标提高胜率

注意事项
  • 本指标为静态工具,只在最新K线显示当前周期的分割线,切换K线或滚动历史时旧线不保留。
  • 黄金分割位是概率性位置,需配合市场确认信号使用。


Core Function
This indicator calculates static Fibonacci retracement levels based on the highest and lowest points of a user-defined historical range (with an optional offset). Values are anchored only on the last bar, ensuring no repainting for reliable signals.

Features & Benefits
  • ✅ No Repaint: Calculated once on the latest bar, eliminating future data bias.
  • ✅ Offset Parameter: Skip recent bars to avoid incomplete candles or short-term noise.
  • ✅ Clear Visualization: Distinct colors and line styles for each level (23.6%, 38.2%, 50%, 61.8%, 80.9%), with right-side labels showing percentages and exact prices.
  • ✅ Accurate Start Point: The vertical dotted line and "Anchor Point" label exactly mark the first bar of the calculation window.
  • ✅ Memory Efficient: Old drawings are automatically deleted to keep charts tidy.

Input Parameters

  • Lookback Period: Number of bars to search for high/low values.
  • Offset Bars: Shift the calculation window backward from the current bar.
  • Display Labels: Toggle percentage labels on/off.

Use Cases
  • Identify pullback supports in uptrends (38.2%, 50%, 61.8%)
  • Spot rebound resistances in downtrends
  • Combine with candlestick patterns, volume, or other indicators for higher accuracy

Note
  • This is a static tool; levels are shown only for the current period on the last bar. Historical periods are not retained when scrolling.
  • Fibonacci levels are probabilistic—always confirm with market context.
Note di rilascio
fixed some bugs

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.