OPEN-SOURCE SCRIPT
AE_Inside Nested Mother Bars

AE_Inside Nested Mother Bars
AE_Inside Nested Mother Bars is a price-action tool designed to automatically detect and map Mother Bar / Inside Bar structures, including nested inside ranges.
The idea is simple:
When price compresses inside a previous candle's body, mark the range and let price decide how it resolves.
What it does
The indicator:
- Detects candles whose body remains inside the previous candle's body
- Requires a configurable minimum number of inside candles before confirming a Mother Bar range
- Automatically draws the confirmed range as a shaded zone
- Supports nested Mother Bars, allowing new structures to form while another range is still active
- Extends the active range until a confirmed candle close breaks above or below it
- Preserves completed ranges historically
- Optionally displays breakout markers
- Limits historical zones to keep the chart manageable
Important detail
The calculation is based on the candle body, not simply the wick high/low.
This means the indicator is looking for genuine body compression inside the Mother Bar rather than treating every overlapping candle as an Inside Bar.
How I use it
I don't treat every Mother Bar as a trade signal.
The zone is primarily a map of compression.
Once price breaks the range, the more interesting question becomes:
What does price do after the break?
Does it continue?
Does it retest the range?
Does it fail and return inside?
Does another nested structure form?
The Mother Bar gives the location. Price action provides the information about the resolution.
Companion indicator
The example chart may also show AE_MTaskRSI as a separate companion indicator.
AE_MTaskRSI is not part of AE_Inside Nested Mother Bars. It is shown separately to demonstrate how price compression can be viewed alongside RSI structure.
Settings
- Minimum Inside Candles — minimum number of qualifying inside candles required to confirm a range.
- Maximum Stored Zones — controls how many completed historical ranges are retained.
- Range Color — controls the zone color.
- Shade Transparency — controls zone transparency.
- Show Breakouts — enables/disables breakout markers.
Notes
This indicator is intended as a visual price-action and market-structure tool, not as a standalone buy/sell signal.
The breakout markers simply identify confirmed closes outside an active Mother Bar range. They do not predict direction or guarantee continuation.
© A3rl
Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute investment, trading, or financial advice.
The levels, zones, and breakout markers are visual reference tools and are not guaranteed support, resistance, entry, exit, or target levels. Past market behavior does not guarantee future results.
Trading leveraged financial markets involves substantial risk. Always apply appropriate risk management and make your own trading decisions. You are solely responsible for your trading and investment decisions.
AE_Inside Nested Mother Bars is a price-action tool designed to automatically detect and map Mother Bar / Inside Bar structures, including nested inside ranges.
The idea is simple:
When price compresses inside a previous candle's body, mark the range and let price decide how it resolves.
What it does
The indicator:
- Detects candles whose body remains inside the previous candle's body
- Requires a configurable minimum number of inside candles before confirming a Mother Bar range
- Automatically draws the confirmed range as a shaded zone
- Supports nested Mother Bars, allowing new structures to form while another range is still active
- Extends the active range until a confirmed candle close breaks above or below it
- Preserves completed ranges historically
- Optionally displays breakout markers
- Limits historical zones to keep the chart manageable
Important detail
The calculation is based on the candle body, not simply the wick high/low.
This means the indicator is looking for genuine body compression inside the Mother Bar rather than treating every overlapping candle as an Inside Bar.
How I use it
I don't treat every Mother Bar as a trade signal.
The zone is primarily a map of compression.
Once price breaks the range, the more interesting question becomes:
What does price do after the break?
Does it continue?
Does it retest the range?
Does it fail and return inside?
Does another nested structure form?
The Mother Bar gives the location. Price action provides the information about the resolution.
Companion indicator
The example chart may also show AE_MTaskRSI as a separate companion indicator.
AE_MTaskRSI is not part of AE_Inside Nested Mother Bars. It is shown separately to demonstrate how price compression can be viewed alongside RSI structure.
Settings
- Minimum Inside Candles — minimum number of qualifying inside candles required to confirm a range.
- Maximum Stored Zones — controls how many completed historical ranges are retained.
- Range Color — controls the zone color.
- Shade Transparency — controls zone transparency.
- Show Breakouts — enables/disables breakout markers.
Notes
This indicator is intended as a visual price-action and market-structure tool, not as a standalone buy/sell signal.
The breakout markers simply identify confirmed closes outside an active Mother Bar range. They do not predict direction or guarantee continuation.
© A3rl
Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute investment, trading, or financial advice.
The levels, zones, and breakout markers are visual reference tools and are not guaranteed support, resistance, entry, exit, or target levels. Past market behavior does not guarantee future results.
Trading leveraged financial markets involves substantial risk. Always apply appropriate risk management and make your own trading decisions. You are solely responsible for your trading and investment decisions.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.