OPEN-SOURCE SCRIPT
Bar Count & EMA

Bar Count & EMA Indicator
A clean and lightweight indicator designed for intraday price action traders.
Features:
1. Bar Count
Displays bar numbers only on 3-minute and 5-minute timeframes
Works during Regular Trading Hours (RTH) only
Shows bar 1 and multiples of 3 (3, 6, 9, 12, 15...)
Color-coded for key bars: Bar 18 & 48 (Red), Bar 6 (Light Green), Multiples of 12 (Sky Blue), Others (Gray)
2. EMA 20
Simple 20-period Exponential Moving Average
Customizable source, length, offset, and color
Why these specific timeframes?
5-Minute Chart (US Markets):
Bar 6, 12, 18, 24... represent 30-min, 1-hour, 1.5-hour intervals
Bar 18 and 48 often mark significant intraday turning points
Best for: ES, NQ, SPY, QQQ
3-Minute Chart (China A-Share Markets):
Bar 10, 20, 30... represent 30-min, 1-hour, 1.5-hour intervals
Designed for CSI 1000 Index Futures (IM) and other China futures
Helps track the 4-hour trading session rhythm (9:30-11:30, 13:00-15:00)
Why Bar Count Matters:
Tracking bar numbers helps traders identify market rhythm, timing cycles, and potential reversal zones throughout the trading session.
A clean and lightweight indicator designed for intraday price action traders.
Features:
1. Bar Count
Displays bar numbers only on 3-minute and 5-minute timeframes
Works during Regular Trading Hours (RTH) only
Shows bar 1 and multiples of 3 (3, 6, 9, 12, 15...)
Color-coded for key bars: Bar 18 & 48 (Red), Bar 6 (Light Green), Multiples of 12 (Sky Blue), Others (Gray)
2. EMA 20
Simple 20-period Exponential Moving Average
Customizable source, length, offset, and color
Why these specific timeframes?
5-Minute Chart (US Markets):
Bar 6, 12, 18, 24... represent 30-min, 1-hour, 1.5-hour intervals
Bar 18 and 48 often mark significant intraday turning points
Best for: ES, NQ, SPY, QQQ
3-Minute Chart (China A-Share Markets):
Bar 10, 20, 30... represent 30-min, 1-hour, 1.5-hour intervals
Designed for CSI 1000 Index Futures (IM) and other China futures
Helps track the 4-hour trading session rhythm (9:30-11:30, 13:00-15:00)
Why Bar Count Matters:
Tracking bar numbers helps traders identify market rhythm, timing cycles, and potential reversal zones throughout the trading session.
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.