OPEN-SOURCE SCRIPT
Spiderlines BTCUSD - daily/weekly

📘 Documentation – Daily and Weekly Spider Lines for Bitcoin
🔹 Purpose of the Script
This script draws dynamic “Spider Lines” in the Bitcoin chart.
The lines connect certain historical candles with a reference candle and extend to the right.
These act as guideline levels that can serve as potential support or resistance zones.
🔹 How It Works
The script operates in two modes, depending on the active chart timeframe:
Weekly Mode (timeframe.isweekly)
The reference date is July 1, 2019.
The number of weeks since that date is calculated.
This defines the connection candle (connection_candle).
Several predefined offsets (e.g., +32, +34, +36 …) are added to the reference to determine starting candles.
Lines are drawn from these candles toward the connection candle.
→ Line color: green
Daily Mode (timeframe.isdaily)
Same reference date: July 1, 2019.
The number of days since that date is calculated.
Again, a connection candle is set.
A different set of offsets (e.g., +224, +238, +252 …) defines the starting candles.
Lines are drawn accordingly.
→ Line color: red
🔹 Line Logic
Each line connects:
Start → bar_index[offset] at high[offset]
End → bar_index[connection_candle] at close[connection_candle]
Lines are extended indefinitely to the right (extend.right).
Appearance: dashed style, width 2.
🔹 Error Handling
If a calculated candle index does not exist in the chart history (e.g., chart data does not go back far enough),
a label is plotted in the chart showing the message:
"Daily idx out of range: 252"
This way, missing lines can be diagnosed easily.
🔹 Color Convention
Weekly Spider Lines → Green
Daily Spider Lines → Red
🔹 Use Cases
Visualization of historical cyclic line patterns.
Helps in technical chart analysis: spotting potential reaction zones in price movement.
Designed mainly for long-term traders and analysts observing Bitcoin in Daily or Weekly timeframes.
🔹 Limitations
Works only on Daily and Weekly charts.
Requires chart data going back to July 1, 2019.
Based purely on fixed offsets → not a classical indicator like Moving Averages or RSI.
🔹 Purpose of the Script
This script draws dynamic “Spider Lines” in the Bitcoin chart.
The lines connect certain historical candles with a reference candle and extend to the right.
These act as guideline levels that can serve as potential support or resistance zones.
🔹 How It Works
The script operates in two modes, depending on the active chart timeframe:
Weekly Mode (timeframe.isweekly)
The reference date is July 1, 2019.
The number of weeks since that date is calculated.
This defines the connection candle (connection_candle).
Several predefined offsets (e.g., +32, +34, +36 …) are added to the reference to determine starting candles.
Lines are drawn from these candles toward the connection candle.
→ Line color: green
Daily Mode (timeframe.isdaily)
Same reference date: July 1, 2019.
The number of days since that date is calculated.
Again, a connection candle is set.
A different set of offsets (e.g., +224, +238, +252 …) defines the starting candles.
Lines are drawn accordingly.
→ Line color: red
🔹 Line Logic
Each line connects:
Start → bar_index[offset] at high[offset]
End → bar_index[connection_candle] at close[connection_candle]
Lines are extended indefinitely to the right (extend.right).
Appearance: dashed style, width 2.
🔹 Error Handling
If a calculated candle index does not exist in the chart history (e.g., chart data does not go back far enough),
a label is plotted in the chart showing the message:
"Daily idx out of range: 252"
This way, missing lines can be diagnosed easily.
🔹 Color Convention
Weekly Spider Lines → Green
Daily Spider Lines → Red
🔹 Use Cases
Visualization of historical cyclic line patterns.
Helps in technical chart analysis: spotting potential reaction zones in price movement.
Designed mainly for long-term traders and analysts observing Bitcoin in Daily or Weekly timeframes.
🔹 Limitations
Works only on Daily and Weekly charts.
Requires chart data going back to July 1, 2019.
Based purely on fixed offsets → not a classical indicator like Moving Averages or RSI.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。