OPEN-SOURCE SCRIPT
Range Zones Alerts

Range Zones — Buy the Green, Sell the Red
Get alerted when price enters a buy zone or a sell zone.
This indicator detects the current trading range, splits it into three color-coded zones, and sends you an alert the moment price touches the zone you care about. No guessing where support and resistance are — the indicator finds them for you.
Green Zone = Buy Zone
The bottom third of the range is shaded green. This is where price has historically found support. When price drops into the green, buyers tend to step in. Set up the Bull alert and get notified the instant price touches this zone — that's your signal to start looking for a long entry.
Red Zone = Sell Zone
The top third of the range is shaded pink/red. This is where price has historically hit resistance. When price pushes into the red, sellers tend to step in. Set up the Bear alert and get notified the instant price touches this zone — that's your signal to start looking for a short entry or to take profits on longs.
Blue Zone = No Trade Zone
The middle third is shaded blue. Price is stuck between support and resistance with no clear edge in either direction. When price is in the blue, wait.
Alerts
Three options in TradingView's alert panel:
— Bull Alert: fires when price touches the green support zone.
— Bear Alert: fires when price touches the red resistance zone.
— Both: fires on either — one alert covers everything.
A built-in cooldown (default 20 bars) prevents spam. You get one alert per zone touch, then silence until the cooldown clears. Bull and bear cooldowns are independent — a green zone alert won't block a red zone alert.
How It Works
The indicator uses pivot-based swing detection to find the most recent significant high and low. The range between them is divided into three equal horizontal zones. The zones update automatically as new swing highs and lows form. A Max Range Age setting ensures stale, outdated ranges are dropped.
Settings
— Pivot Strength: how significant the swing points need to be. Default 20. Higher = wider ranges.
— Max Range Age: how old the range can be before it's dropped. Default 300 bars.
— Alert Cooldown: bars of silence after an alert fires. Default 20.
— Zone Colors: fully customizable.
Works on any ticker, any timeframe. Add it to your chart, set up your alerts, and let the zones tell you when it's time to trade.
Get alerted when price enters a buy zone or a sell zone.
This indicator detects the current trading range, splits it into three color-coded zones, and sends you an alert the moment price touches the zone you care about. No guessing where support and resistance are — the indicator finds them for you.
Green Zone = Buy Zone
The bottom third of the range is shaded green. This is where price has historically found support. When price drops into the green, buyers tend to step in. Set up the Bull alert and get notified the instant price touches this zone — that's your signal to start looking for a long entry.
Red Zone = Sell Zone
The top third of the range is shaded pink/red. This is where price has historically hit resistance. When price pushes into the red, sellers tend to step in. Set up the Bear alert and get notified the instant price touches this zone — that's your signal to start looking for a short entry or to take profits on longs.
Blue Zone = No Trade Zone
The middle third is shaded blue. Price is stuck between support and resistance with no clear edge in either direction. When price is in the blue, wait.
Alerts
Three options in TradingView's alert panel:
— Bull Alert: fires when price touches the green support zone.
— Bear Alert: fires when price touches the red resistance zone.
— Both: fires on either — one alert covers everything.
A built-in cooldown (default 20 bars) prevents spam. You get one alert per zone touch, then silence until the cooldown clears. Bull and bear cooldowns are independent — a green zone alert won't block a red zone alert.
How It Works
The indicator uses pivot-based swing detection to find the most recent significant high and low. The range between them is divided into three equal horizontal zones. The zones update automatically as new swing highs and lows form. A Max Range Age setting ensures stale, outdated ranges are dropped.
Settings
— Pivot Strength: how significant the swing points need to be. Default 20. Higher = wider ranges.
— Max Range Age: how old the range can be before it's dropped. Default 300 bars.
— Alert Cooldown: bars of silence after an alert fires. Default 20.
— Zone Colors: fully customizable.
Works on any ticker, any timeframe. Add it to your chart, set up your alerts, and let the zones tell you when it's time to trade.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Jason Parker is the author of tradinghabits.com/ an editorial site on trading and investing.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Jason Parker is the author of tradinghabits.com/ an editorial site on trading and investing.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.