OPEN-SOURCE SCRIPT
Step Range Breakout & Trailing Stop [BigBeluga]

🔵 OVERVIEW
🔵 HOW IT WORKS
🔵 HOW TO USE
🔵 NOTES
Step Range Breakout & Trailing Stop [BigBeluga] is an indicator that detects quiet consolidation zones, catches clean breakouts, and manages open trades automatically with a dynamic ATR trailing stop. It solves the problem of false signals in sideways markets by highlighting only stable, confirmed ranges, then switching to a trailing stop mode once price breaks out.
🔵 HOW IT WORKS
The system runs on an automated state machine that moves through three phases — Searching, Zone Active, and Trailing:
1 — Range & Consolidation Detection
- Structure Lookback: Calculates the highest high and lowest low over the Structure Length to define structural boundaries.
- Consolidation Check: Confirms a valid zone when the range average stays unchanged over Consolidation Bars / Length bars, then draws a gradient box and center line.
- Range Label: Displays the range size in Price, Ticks, or Both, based on the Range Display Format setting.
2 — Breakout & Trailing Stop Engine
- Breakout Triggers: Fires bullish when price closes above the range top, and bearish when price closes below the range bottom.
- Dynamic Trailing Stop: Activates an ATR-based trailing stop using Trailing Stop ATR Length and Trailing Stop Multiplier, with a fill channel that follows price to lock in gains.
- Trade Exit: Closes the trade when price crosses the trailing stop and resets the state machine back to Searching.
3 — Performance Dashboard
🔵 HOW TO USE
Beyond mapping breakout zones, the indicator can be applied in several ways:
- Spot Sideways Markets: Let the script highlight consolidation ranges automatically and show the exact range size in price or ticks.
- Trade Breakouts Safely: Wait for a candle to close outside the range box, then enter in the direction of the breakout.
- Manage Risk with Trailing Stops: Use the colored trailing stop line and fill channel to manage open trades and protect profits.
- Review Performance Live: Check the dashboard for win rate and last breakout info without leaving the chart.
- Tune Sensitivity: Adjust the ATR multiplier for tighter or looser trailing stops depending on market volatility.
🔵 NOTES
Why this implementation is unique:
- Combines automatic range box generation with an ATR-based trailing stop and gradient fill channel visuals.
- Uses an ATR reference line instead of the midpoint for cleaner, more accurate trailing stop fills.
- Includes a built-in performance dashboard that calculates win rate dynamically in real time.
- Fully customizable colors, display formats, and ATR settings to match any market or timeframe.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🌐 bigbeluga.org/tv - Get access to our powerful tools & indicators.
🔵 Learn More -> docs.bigbeluga.org/
🔵 Join Discord -> go.bigbeluga.org/k65q9bfqfu
All content provided by BigBeluga is for educational purposes only
🔵 Learn More -> docs.bigbeluga.org/
🔵 Join Discord -> go.bigbeluga.org/k65q9bfqfu
All content provided by BigBeluga is for educational purposes only
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🌐 bigbeluga.org/tv - Get access to our powerful tools & indicators.
🔵 Learn More -> docs.bigbeluga.org/
🔵 Join Discord -> go.bigbeluga.org/k65q9bfqfu
All content provided by BigBeluga is for educational purposes only
🔵 Learn More -> docs.bigbeluga.org/
🔵 Join Discord -> go.bigbeluga.org/k65q9bfqfu
All content provided by BigBeluga is for educational purposes only
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.