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
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.