3-Phase ORB Logic: Break, Retest, Confirm

A state-driven Opening Range framework that sequences Break → Retest → Confirm. It does not just draw ORB lines or tag any breakout; it tracks explicit state transitions with timing and tolerance to filter noise.
How it works (method & originality)
- Break: After your ORB window, a valid break requires the prior close to be inside the range and the new close to be outside the ORB high/low (prevents slow drift).
- Retest (configurable): Price must revisit the ORB edge within a tolerance band you define by % of the ORB range or a fixed price. Controls include Retest Side (Inside / Outside / Either), Proximity (Touch / Near), Basis (Close / Wick), and optional Cap Outside (limit far-outside closes). Retest must occur within a Max Bars window; same-bar Break→Retest is optional.
- Confirm: A later bar must break beyond the max/min of the break + retest reference within Max Bars (or the same bar if enabled). Confirmation can be based on Wick, Close (same-bar only), or Close (always) for stricter behavior.
- Engine details: Per-bar state resets, explicit bar indexing for Break/Retest/Confirm, dual tolerance modes (percent or price), inside/outside/either logic, selectable wick/close handling, optional same-bar paths, and projected ORB lines. This is a sequence-and-tolerance framework, not a simple ORB level plotter.
Inputs
- Session: ORB Session window
- Tolerance: Mode (Percent or Price) + value
- Retest controls: Retest Side (Inside/Outside/Either), Proximity (Touch/Near), Basis (Close/Wick), Cap Outside (on/off)
- Timing: Max Bars for Retest, Max Bars for Confirm, Allow same-bar Break→Retest, Allow same-bar Retest→Confirm
- Confirmation: Confirm Basis (Wick / Close same-bar only / Close always)
- Display: Plot shapes or hide markers; ORB line projection length (bars)
- Presets: Classic ORB (Outside • Touch • Close • 20%), Inside Touch (Close • 10%), Either Near (Wick • 15%), or Custom
How to use
- Set the ORB session (e.g., 09:30–09:45).
- Choose a Preset or use Custom and configure: Tolerance Mode/value, Retest Side/Proximity/Basis, optional Cap Outside.
- Set Max Bars for Retest/Confirm and pick Confirm Basis (Wick or Close).
- After a Break, wait for a valid Retest within your tolerance window, then a Confirm within the allowed bars.
- Act after Confirm (or enable same-bar options if you allow them).
- (Optional) Enable alerts for Break / Retest / Confirm; extend ORB lines forward for context.
Marker legend
Triangle = Break, X = Retest, Circle = Confirm (Up = long side, Down = short side.)
When signals reset or expire
- Retest timeout: If Retest doesn’t occur within Max Bars, the sequence resets to Break-wait.
- Confirm timeout: If Confirm doesn’t occur within Max Bars after Retest, the sequence resets.
- Invalidation: With Inside retest, a move too far back inside (beyond tolerance) resets. With Outside retest and Cap Outside ON, a move too far outside (beyond tolerance) resets.
- Re-entry into the range during the sequence can reset depending on your side/tolerance settings.
Non-repainting behavior
Logic evaluates bar-by-bar with explicit state resets. For stricter confirmation, select Confirm Basis = Close (always).
Practical notes
Works on any timeframe. Match Percent tolerance to instrument volatility or use Price for fixed-tick products. Alerts are provided for each phase. The screenshot shows a full Break → Retest → Confirm sequence with only this script applied.
Skrip jemputan sahaja
Hanya pengguna yang diluluskan oleh penulis boleh mengakses skrip ini. Anda perlu memohon dan mendapatkan kebenaran untuk menggunakannya. Ini selalunya diberikan selepas pembayaran. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi terus Chart_Bully.
TradingView tidak menyarankan pembayaran untuk atau menggunakan skrip kecuali anda benar-benar mempercayai penulisnya dan memahami bagaimana ia berfungsi. Anda juga boleh mendapatkan alternatif sumber terbuka lain yang percuma dalam skrip komuniti kami.
Arahan penulis
Amaran: sila baca panduan kami untuk skrip jemputan sahaja sebelum memohon akses.
Penafian
Skrip jemputan sahaja
Hanya pengguna yang diluluskan oleh penulis boleh mengakses skrip ini. Anda perlu memohon dan mendapatkan kebenaran untuk menggunakannya. Ini selalunya diberikan selepas pembayaran. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi terus Chart_Bully.
TradingView tidak menyarankan pembayaran untuk atau menggunakan skrip kecuali anda benar-benar mempercayai penulisnya dan memahami bagaimana ia berfungsi. Anda juga boleh mendapatkan alternatif sumber terbuka lain yang percuma dalam skrip komuniti kami.
Arahan penulis
Amaran: sila baca panduan kami untuk skrip jemputan sahaja sebelum memohon akses.