OPEN-SOURCE SCRIPT
Initial Balance Breakout [samjNQ] v3

---samjNQ Initial Balance Breakout strategy---
**Initial Balance Breakout [MES] — Strategy Description**
Trades breakouts of the first-hour Initial Balance on the Micro E-mini S&P 500 (MES1!) using a clean set of filters to avoid noise and low-quality setups.
**How it works:**
The Initial Balance (IB) is defined as the high and low of the 9:30–10:30 AM ET window — the first hour of Regular Trading Hours. Once that window closes and the IB locks, the strategy waits for price to break above the IB High (long) or below the IB Low (short) during the trade window (10:30 AM–2:30 PM ET).
**Filters applied:**
- **VWAP trend filter** — only takes long breakouts when price is above VWAP, and short breakouts when price is below. Avoids trading against intraday momentum.
- **IB range filter** — skips days where the IB is too narrow (choppy, commissions eat returns) or too wide (extensions become unreachable). Configurable min/max in points.
- **2:30 PM cutoff** — no new entries in the last 90 minutes of the session. Late breakouts rarely have time to reach targets.
- **One trade per direction per day** — no re-entries after a stop-out.
**Exits:**
- Stop: opposite IB level (IB Low for longs, IB High for shorts)
- Target: 1.5× the IB range beyond the breakout level
- EOD flat: any open position is closed at 3:55 PM ET
**Chart visuals:**
- Yellow background = IB building window
- Blue lines = IB High / IB Low / Midpoint
- Green lines = long extension targets (T1 / T2)
- Red lines = short extension targets (T1 / T2)
- Orange line = VWAP
- Gray background = day filtered out by range rules
**Settings:** All parameters are adjustable — IB window, trade window, target multiples, stop mode, range filter thresholds, and VWAP filter toggle.
Built and backtested on MES1! 5-minute chart. Commission set to $2.25/contract, 1-tick slippage included.
---
**Initial Balance Breakout [MES] — Strategy Description**
Trades breakouts of the first-hour Initial Balance on the Micro E-mini S&P 500 (MES1!) using a clean set of filters to avoid noise and low-quality setups.
**How it works:**
The Initial Balance (IB) is defined as the high and low of the 9:30–10:30 AM ET window — the first hour of Regular Trading Hours. Once that window closes and the IB locks, the strategy waits for price to break above the IB High (long) or below the IB Low (short) during the trade window (10:30 AM–2:30 PM ET).
**Filters applied:**
- **VWAP trend filter** — only takes long breakouts when price is above VWAP, and short breakouts when price is below. Avoids trading against intraday momentum.
- **IB range filter** — skips days where the IB is too narrow (choppy, commissions eat returns) or too wide (extensions become unreachable). Configurable min/max in points.
- **2:30 PM cutoff** — no new entries in the last 90 minutes of the session. Late breakouts rarely have time to reach targets.
- **One trade per direction per day** — no re-entries after a stop-out.
**Exits:**
- Stop: opposite IB level (IB Low for longs, IB High for shorts)
- Target: 1.5× the IB range beyond the breakout level
- EOD flat: any open position is closed at 3:55 PM ET
**Chart visuals:**
- Yellow background = IB building window
- Blue lines = IB High / IB Low / Midpoint
- Green lines = long extension targets (T1 / T2)
- Red lines = short extension targets (T1 / T2)
- Orange line = VWAP
- Gray background = day filtered out by range rules
**Settings:** All parameters are adjustable — IB window, trade window, target multiples, stop mode, range filter thresholds, and VWAP filter toggle.
Built and backtested on MES1! 5-minute chart. Commission set to $2.25/contract, 1-tick slippage included.
---
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.