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.
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
✅My Telegram
t.me/trading_mura
t.me/trading_mura
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
✅My Telegram
t.me/trading_mura
t.me/trading_mura
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。