OPEN-SOURCE SCRIPT
Custom Range Breakout

Custom Range Breakout Indicator
This indicator implements a rule-based **range breakout framework** with integrated **stop-and-reverse logic**, designed for intraday traders who prefer clear, execution-ready signals.
---
Concept
The script defines a customizable **price range** based on a selected time window and generates signals when price breaks out of that range.
* The **high and low** of the defined range act as key levels
* Once the range is complete, price closing outside the range establishes directional bias
* If price reverses and crosses the opposite boundary, the system **exits and reverses position**
---
How It Works
1. **Range Formation**
* Define a custom time window (e.g., 09:30–10:00)
* The script captures:
* Range High
* Range Low
* The range is displayed as a shaded box across historical and current sessions
2. **Breakout Signals**
* **BUY** → Close above range high
* **SELL** → Close below range low
* Signals are generated only **after the range is fully formed**
3. **Stop & Reverse Logic**
* Long position exits when price closes below range low
* Short position exits when price closes above range high
* If trade limit allows, the system **reverses position on the same candle**
4. **Trade Limitation**
* Maximum **2 entries per day**
* Helps reduce overtrading and keeps signals structured
---
Visual Elements
* Range shown as a **dynamic shaded box**
* Labels plotted directly on chart:
* `BUY`
* `SELL`
* `BUY EXIT`
* `SELL EXIT`
* Customizable **label text color** for better chart visibility
---
Alerts
Built-in alert conditions for:
* BUY
* SELL
* BUY EXIT
* SELL EXIT
These can be used for:
* Manual trade alerts
* Integration with external automation platforms
---
Notes
* Signals are based on **candle close**, not intrabar movement
* Designed for **intraday usage**
* No profit targets are defined — exits can be managed externally if required
* Works across instruments and timeframes
---
Disclaimer
This indicator provides a **systematic interpretation of range breakout behavior**.
It does not guarantee profitability and should be used with proper risk management.
---
Suggested Use
* Combine with higher timeframe trend or bias
* Avoid trading on very narrow range days
* Use alerts for consistent execution
---
This indicator implements a rule-based **range breakout framework** with integrated **stop-and-reverse logic**, designed for intraday traders who prefer clear, execution-ready signals.
---
Concept
The script defines a customizable **price range** based on a selected time window and generates signals when price breaks out of that range.
* The **high and low** of the defined range act as key levels
* Once the range is complete, price closing outside the range establishes directional bias
* If price reverses and crosses the opposite boundary, the system **exits and reverses position**
---
How It Works
1. **Range Formation**
* Define a custom time window (e.g., 09:30–10:00)
* The script captures:
* Range High
* Range Low
* The range is displayed as a shaded box across historical and current sessions
2. **Breakout Signals**
* **BUY** → Close above range high
* **SELL** → Close below range low
* Signals are generated only **after the range is fully formed**
3. **Stop & Reverse Logic**
* Long position exits when price closes below range low
* Short position exits when price closes above range high
* If trade limit allows, the system **reverses position on the same candle**
4. **Trade Limitation**
* Maximum **2 entries per day**
* Helps reduce overtrading and keeps signals structured
---
Visual Elements
* Range shown as a **dynamic shaded box**
* Labels plotted directly on chart:
* `BUY`
* `SELL`
* `BUY EXIT`
* `SELL EXIT`
* Customizable **label text color** for better chart visibility
---
Alerts
Built-in alert conditions for:
* BUY
* SELL
* BUY EXIT
* SELL EXIT
These can be used for:
* Manual trade alerts
* Integration with external automation platforms
---
Notes
* Signals are based on **candle close**, not intrabar movement
* Designed for **intraday usage**
* No profit targets are defined — exits can be managed externally if required
* Works across instruments and timeframes
---
Disclaimer
This indicator provides a **systematic interpretation of range breakout behavior**.
It does not guarantee profitability and should be used with proper risk management.
---
Suggested Use
* Combine with higher timeframe trend or bias
* Avoid trading on very narrow range days
* Use alerts for consistent execution
---
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.