OPEN-SOURCE SCRIPT
Al Brooks_BarCount_Start from Opening

🔹 Key Features
Automatically detects stocks vs futures
Custom highlight rules
🔹 Why count from the open?
In Al Brooks’ Price Action framework:
👉 This indicator resets precisely at the RTH open, keeping the count aligned with real trading decisions.
🔹 Inputs Overview
Display at every X bars
Show bar numbers at fixed intervals (bar 1 is always shown)
Count From RTH Open (Session Filter)
Limits counting strictly to regular trading hours (recommended ON)
Special Color Multiple
Highlights every N-th bar
Special Number 1 / 2
Highlights specific bar numbers
Label Size / Colors
Visual customization options
🔹 Markets Supported
✅ US index futures (ES, MES, NQ, MNQ, GC, CL – RTH)
✅ US stocks and indices (NYSE / NASDAQ)
❗ Not intended for 24h markets (e.g. crypto)
🔹 Usage Tips (Al Brooks Style)
- Counts from the RTH open every trading day
- Stocks: 09:30–16:00 (New York Time)
- Futures: 08:30–15:15 (Chicago Time)
Automatically detects stocks vs futures
- Always displays the first bar of the session
- Optional display every N bars to reduce chart clutter
Custom highlight rules
- Highlight specific bar numbers (e.g. bar 18)
- Highlight bar multiples (e.g. every 12 bars)
- Fully customizable label size and colors
🔹 Why count from the open?
In Al Brooks’ Price Action framework:
- The first 30–60 bars after the open often define the day’s structure
- Trends, failed breakouts, and trading ranges frequently align with specific bar counts
- Counting across overnight or pre-market sessions can distort intraday analysis
👉 This indicator resets precisely at the RTH open, keeping the count aligned with real trading decisions.
🔹 Inputs Overview
Display at every X bars
Show bar numbers at fixed intervals (bar 1 is always shown)
Count From RTH Open (Session Filter)
Limits counting strictly to regular trading hours (recommended ON)
Special Color Multiple
Highlights every N-th bar
Special Number 1 / 2
Highlights specific bar numbers
Label Size / Colors
Visual customization options
🔹 Markets Supported
✅ US index futures (ES, MES, NQ, MNQ, GC, CL – RTH)
✅ US stocks and indices (NYSE / NASDAQ)
❗ Not intended for 24h markets (e.g. crypto)
🔹 Usage Tips (Al Brooks Style)
- Observe price behavior around early session bars (5–10)
- Watch key counts like 12, 18, 24 for acceleration or failure
- Combine with EMAs, trend lines, and trading-range highs/lows
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.