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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。