OPEN-SOURCE SCRIPT
Intraday Buy/Sell/Average Zones by Chaitu50c

Intraday Buy/Sell/Average Zones by chaitu50c
Timeframe:
Tested on the 5-minute chart.
Recommended timeframe: 5-minute
What it does
This indicator marks intraday Buy (green) and Sell (red) zones made by strong close-confirmed breakouts. These zones act as support/resistance. If price later closes through a zone, the zone changes color from that bar forward (support ↔ resistance). It can flip more than once.
How zones form
Single breakout: an opposite-type candle closes beyond the previous candle’s high/low.
Double breakout: a base candle, then two opposite-type candles, and the second one closes beyond the base high/low.
Zone size
Buy zone: from the combo lowest low up to the nearest open/close of the combo.
Sell zone: from the combo highest high down to the nearest open/close of the combo.
Color shift (optional)
If price closes through a zone, it flips color at that bar and behaves as the other side (support ↔ resistance). Flips can happen again later.
Overlap control
When a new zone overlaps an existing same-color zone in the same session, choose:
Merge (combine), or
Suppress (ignore the new one).
Flipped zones use their current color for this.
Right edge & session
All zones extend to the right (your offset). Detection is limited to your chosen session, and you can show only the last N sessions.
---
How to trade (simple)
A) Initial breakout trade
When a new zone forms, that breakout itself can be a trade idea in the breakout direction, The stoploss will be the zone.
B) Zone breakout trade (flip)
If price later closes out of a zone and it changes color, that breakout is another trade opportunity in the new direction.
C) Retrace & average trade
When price retests a zone, wait for a confirmation candle in the zone’s favor
— bullish close for a green zone, bearish close for a red zone — then average entries inside/near the zone.
Place stops just beyond the opposite edge of the zone.
If the zone flips color, stop averaging; bias changed.
---
Key settings
Breakout type: Single and/or Double
Confirm on Close: strict mode (no intrabar preview) or allow intrabar preview that auto-removes if fail
Color Shift on Breaks: on/off
Same-Type Overlap: Merge/Suppress
Session, Sessions to Display, Right Offset, Colors, Max Zones
Reminder: Best results on the 5-minute timeframe (tested and recommended).
Timeframe:
Tested on the 5-minute chart.
Recommended timeframe: 5-minute
What it does
This indicator marks intraday Buy (green) and Sell (red) zones made by strong close-confirmed breakouts. These zones act as support/resistance. If price later closes through a zone, the zone changes color from that bar forward (support ↔ resistance). It can flip more than once.
How zones form
Single breakout: an opposite-type candle closes beyond the previous candle’s high/low.
Double breakout: a base candle, then two opposite-type candles, and the second one closes beyond the base high/low.
Zone size
Buy zone: from the combo lowest low up to the nearest open/close of the combo.
Sell zone: from the combo highest high down to the nearest open/close of the combo.
Color shift (optional)
If price closes through a zone, it flips color at that bar and behaves as the other side (support ↔ resistance). Flips can happen again later.
Overlap control
When a new zone overlaps an existing same-color zone in the same session, choose:
Merge (combine), or
Suppress (ignore the new one).
Flipped zones use their current color for this.
Right edge & session
All zones extend to the right (your offset). Detection is limited to your chosen session, and you can show only the last N sessions.
---
How to trade (simple)
A) Initial breakout trade
When a new zone forms, that breakout itself can be a trade idea in the breakout direction, The stoploss will be the zone.
B) Zone breakout trade (flip)
If price later closes out of a zone and it changes color, that breakout is another trade opportunity in the new direction.
C) Retrace & average trade
When price retests a zone, wait for a confirmation candle in the zone’s favor
— bullish close for a green zone, bearish close for a red zone — then average entries inside/near the zone.
Place stops just beyond the opposite edge of the zone.
If the zone flips color, stop averaging; bias changed.
---
Key settings
Breakout type: Single and/or Double
Confirm on Close: strict mode (no intrabar preview) or allow intrabar preview that auto-removes if fail
Color Shift on Breaks: on/off
Same-Type Overlap: Merge/Suppress
Session, Sessions to Display, Right Offset, Colors, Max Zones
Reminder: Best results on the 5-minute timeframe (tested and recommended).
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.