MTF Outside Bars + Inside Bars

OIOI marks outside bars (OSB) and inside bars (ISB) from up to three higher timeframes each, directly on your chart. When a higher-timeframe candle closes as an outside or inside bar, the script draws that candle’s range as a box and projects its high, low and midpoint forward as reference levels.
What it detects
Detection runs on the closed higher-timeframe candle, so patterns are not drawn on a candle that is still forming.
Features
How to use it
Notes
Disclaimer: This indicator is a charting and educational tool, not financial advice or a trading signal. Past patterns do not guarantee future results. Always use proper risk management.
What it detects
- Outside Bar (OSB): the candle’s high is above the previous candle’s high AND its low is below the previous candle’s low. It engulfs the prior range.
- Inside Bar (ISB): the candle’s high is below the previous candle’s high AND its low is above the previous candle’s low. It sits entirely inside the prior range.
Detection runs on the closed higher-timeframe candle, so patterns are not drawn on a candle that is still forming.
Features
- Up to 3 timeframes for Outside Bars and 3 for Inside Bars, each with its own on/off toggle. Defaults are 5m, 15m and 60m, with only the 5m ones on.
- Box covering the full higher-timeframe candle that formed the pattern.
- High / low lines extended forward from the pattern, with adjustable width and style (solid, dashed, dotted).
- Midpoint line (50% of the range), also customisable.
- Labels showing the timeframe and pattern type, e.g. “15min OSB” or “1H ISB”, with adjustable text colour and size.
- Same-timeframe bar coloring: when the chart timeframe matches an enabled timeframe, the outside or inside candles themselves are tinted on the chart.
- Session filter (optional): restrict detection to up to three custom sessions, in New York time. Defaults are 19:30–21:30, 02:00–05:00 and 07:00–09:00.
- Separate styling for outside and inside bars (colour, border width, line styles), with a cap of up to 25 patterns per timeframe so the chart stays clean.
- Alerts for “Outside Bar” and “Inside Bar” detection.
How to use it
- Pick the timeframes you want under Outside Bars · Timeframes and Inside Bars · Timeframes, and tick Enable.
- Choose a chart timeframe equal to or lower than the selected ones. Timeframes lower than your chart timeframe are ignored.
- Optionally turn on the session filter to focus on your trading windows.
- Use the box edges and midpoint as reference levels, for example for range-based, breakout or mean-reversion analysis. Outside bars show expansion and indecision; inside bars show compression.
Notes
- Boxes only draw for timeframes higher than the chart timeframe. On the same timeframe, you get bar coloring instead.
- Alerts fire when a pattern completes, not when price breaks out of it.
- Patterns are drawn when the higher-timeframe candle closes, so they appear after the fact and are not predictive on their own.
Disclaimer: This indicator is a charting and educational tool, not financial advice or a trading signal. Past patterns do not guarantee future results. Always use proper risk management.
Luck Is What Happens When Preparation Meets Opportunity
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Luck Is What Happens When Preparation Meets Opportunity
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.