OPEN-SOURCE SCRIPT
Setup 9/13 Lite — Exhaustion & Reference Levels

What it is
A clean, lightweight tool that implements the classic 1–9 setup progression, to-13 exhaustion signal, and bar-#1 reference levels. Built for clarity with minimal chart clutter.
How it works
Setup (1–9):
• Buy side counts bars where Close < Close[4].
• Sell side counts bars where Close > Close[4].
• Counter resets on an opposite condition.
• On completion, a triangle marker appears (Buy 9 below bar, Sell 9 above bar).
Reference levels (from bar #1 of a completed setup):
• After a completed Buy setup, draw a horizontal line from the Low of bar #1.
• After a completed Sell setup, draw a horizontal line from the High of bar #1.
• Lines extend to the right and update on new completed setups.
Exhaustion (…to 13):
• Starts on the bar after a completed 9.
• Buy side: increments when Close ≤ Low[2] (or < if “Strict” is on).
• Sell side: increments when Close ≥ High[2] (or > if “Strict” is on).
• Stops when 13 is reached (single circle marker) or when a new opposite 9 appears.
Strict comparisons:
Toggle between strict (<, >) and non-strict (≤, ≥) rules for both parts.
Header panel:
A compact top-right table shows live Setup and Exhaustion counts.
Inputs
Visual guide
Alerts
Notes
Works on any symbol/timeframe; higher liquidity improves readings. These signals indicate potential exhaustion/context, not a standalone trading system—combine with trend filters, S/R, and risk management.
Disclaimer
Educational use only. Not financial advice.
A clean, lightweight tool that implements the classic 1–9 setup progression, to-13 exhaustion signal, and bar-#1 reference levels. Built for clarity with minimal chart clutter.
How it works
Setup (1–9):
• Buy side counts bars where Close < Close[4].
• Sell side counts bars where Close > Close[4].
• Counter resets on an opposite condition.
• On completion, a triangle marker appears (Buy 9 below bar, Sell 9 above bar).
Reference levels (from bar #1 of a completed setup):
• After a completed Buy setup, draw a horizontal line from the Low of bar #1.
• After a completed Sell setup, draw a horizontal line from the High of bar #1.
• Lines extend to the right and update on new completed setups.
Exhaustion (…to 13):
• Starts on the bar after a completed 9.
• Buy side: increments when Close ≤ Low[2] (or < if “Strict” is on).
• Sell side: increments when Close ≥ High[2] (or > if “Strict” is on).
• Stops when 13 is reached (single circle marker) or when a new opposite 9 appears.
Strict comparisons:
Toggle between strict (<, >) and non-strict (≤, ≥) rules for both parts.
Header panel:
A compact top-right table shows live Setup and Exhaustion counts.
Inputs
- Show Setup (1–9)
- Show Exhaustion (to 13)
- Show reference levels (from bar #1)
- Strict comparisons (< /> instead of ≤ / ≥)
- Paint bars during Setup
- Paint bars during Exhaustion
(Exhaustion tint overrides Setup tint when both are enabled.)
Visual guide
- Green triangle below bar = Buy Setup 9
- Red triangle above bar = Sell Setup 9
- Green circle below bar = Buy Exhaustion 13
- Red circle above bar = Sell Exhaustion 13
- Green/Red horizontal line = Reference level from bar #1 of the last completed setup
Alerts
- Buy Setup 9 completed
- Sell Setup 9 completed
- Buy Exhaustion reached 13
- Sell Exhaustion reached 13
Tip: for fewer false pings, set alerts to “Once per bar close.”
Notes
Works on any symbol/timeframe; higher liquidity improves readings. These signals indicate potential exhaustion/context, not a standalone trading system—combine with trend filters, S/R, and risk management.
Disclaimer
Educational use only. Not financial advice.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
✅My Telegram
t.me/trading_mura
t.me/trading_mura
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
✅My Telegram
t.me/trading_mura
t.me/trading_mura
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.