OPEN-SOURCE SCRIPT
Session Candle Levels & Alerts - Weekly Swing

The swing companion to the intraday version: draws the weekly reference
levels swing traders track and alerts on volume-confirmed breaks.
How it works:
- Monday/Wednesday high-low, previous week and previous month high-low,
weekly and monthly opens — each with a configurable lookback of how many
past occurrences stay on the chart.
- Thu-Fri-Mon pattern: when Friday's high stays below Thursday's high, the
setup arms and targets Friday's low the following week (alerted).
- Breaks can require volume above a configurable multiple of average volume
before they count ("volume-confirmed").
- Optional COT panel (CFTC Commitment of Traders via TradingView's COT
library): managed-money and retail net positioning with weekly change,
auto-mapped from the chart symbol.
What makes it original: the COT layer goes beyond plotting net positions — it
percentile-ranks managed money against ~2 years of history and flips it
contrarian at extremes (crowded trades), and it maps DAX/FTSE to EUR/GBP COT
data with an inverted score, since there is no direct COT series for those
indices.
How to use it: on a daily or 4h chart, watch how price behaves at the
Monday/Wednesday and previous week/month extremes — a volume-confirmed close
beyond a level signals continuation, a rejection signals range rotation. The
Thu-Fri-Mon pattern arms automatically at the Monday open and alerts when
Friday's low is hit. Use the COT background/table as a weekly positioning
filter for swing direction, not as an entry trigger.
levels swing traders track and alerts on volume-confirmed breaks.
How it works:
- Monday/Wednesday high-low, previous week and previous month high-low,
weekly and monthly opens — each with a configurable lookback of how many
past occurrences stay on the chart.
- Thu-Fri-Mon pattern: when Friday's high stays below Thursday's high, the
setup arms and targets Friday's low the following week (alerted).
- Breaks can require volume above a configurable multiple of average volume
before they count ("volume-confirmed").
- Optional COT panel (CFTC Commitment of Traders via TradingView's COT
library): managed-money and retail net positioning with weekly change,
auto-mapped from the chart symbol.
What makes it original: the COT layer goes beyond plotting net positions — it
percentile-ranks managed money against ~2 years of history and flips it
contrarian at extremes (crowded trades), and it maps DAX/FTSE to EUR/GBP COT
data with an inverted score, since there is no direct COT series for those
indices.
How to use it: on a daily or 4h chart, watch how price behaves at the
Monday/Wednesday and previous week/month extremes — a volume-confirmed close
beyond a level signals continuation, a rejection signals range rotation. The
Thu-Fri-Mon pattern arms automatically at the Monday open and alerts when
Friday's low is hit. Use the COT background/table as a weekly positioning
filter for swing direction, not as an entry trigger.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.