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.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.