OPEN-SOURCE SCRIPT

Setup 9/13 Lite — Exhaustion & Reference Levels

69
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
  • 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.

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.